PDA

View Full Version : matlab plot discussion- reg


saravanan13
Jul11-11, 02:27 AM
Dear friends
I M. Saravanan, currently working in matlab attempting to plot some solutions of the differential equations.
When plotting I received a command "Warning: Matrix is singular to working precision" for the solution step in the M files. Since as a beginner this statement make me to proceed further.
The solution involves a lot of parameter so that by tuning the parameter I could get the plot.

Also another command which I received is "Nan".

I could be benefit enough if someone could be help me in this regard.

MATLABdude
Jul11-11, 10:43 PM
The warning tells you that you probably divided by zero somewhere (or did another similar operation). The NaN (not a number, and not the delicious naan bread) you see in your results is confirmation of this. I'd suggest using the debugging features to set some breakpoints, or step through your m-file and debug your code:
http://www.mathworks.com/help/techdoc/matlab_env/brqxeeu-175.html
http://en.wikibooks.org/wiki/MATLAB_Programming/Debugging_M_Files