Text-only
Table of Contents (
frame
/
no frame
)
(30) Tips for Debugging Your Matlab Programs
Matlab Debugging Tips
Add
keyboard
command to m-file
example variables from the workspace
hit enter key to continue execution
Remove selected semicolons from line of m-file
Use the
disp
command
disp('in the else if section')
Use the
sprintf
command along with
disp
str1=sprintf('in for loop i = %d,temp(i)=%g\n',i,temp(i));
disp(str1);
try:
>>
[tsum,avg]=stats_error(rand(1,50))
Debugging_Tips.src last modified Oct 17, 2007
Introduction
Table of Contents
(
frame
/
no frame
)
Printable
(single file)
© Dartmouth College