Inf NaN error

Thread Starter

nlsafura88

Joined Apr 12, 2012
1
Hi..
I am currently trying to run a program from m file to be implemented in matlab/simulink model..
However, when I try to run the program, the error such as below came out

??? Error using ==> tracklsq_4 at 12
Derivative input 1 of 'optsim_4/Integrator' at time 7.2 is Inf or NaN.
Stopping simulation. There may be a singularity in the solution. If
not, try reducing the step size (either by reducing the fixed step
size or by tightening the error tolerances).

Error in ==> PSO_4 at 44
current_fitness(i) = tracklsq_4(current_position:),i));

Does anyone know why this is happened?
I've try to play around with several parameters in 'configuration parameters', but it still doesn't work..

Since I am new to this field,
I would be very appreciate if someone can help me or give me some suggestions for this problem..
The file is attached for those who would like to fix this problem..
Thanks.. :)
 
Last edited:

panic mode

Joined Oct 10, 2011
2,761
obviously it does not like the value. you need to track it down and see what does it. you can place breakpoints and/or run in steps until you narrow it down on culprit.
 
Top