debugging a program
Ältere Kommentare anzeigen
Hi all; I've written a program including two loops and I want to debug it using "keyboard " command.
for n=1:1000
for qq=1:100
tsd (n,qq)= rand(1);
keyboard
end
end
I want to see the "tsd " values just in "n=10 " and "qq=50, 70; 89" . How can I do this using "keyboard" and "return" commands. I look forward to see your reply,
Akzeptierte Antwort
Weitere Antworten (2)
per isakson
am 1 Mär. 2014
0 Stimmen
Here are some links on debugging in Matlab
Alex
am 30 Sep. 2014
Bearbeitet: per isakson
am 30 Sep. 2014
How do i fix this?
for i = 1:x_max
for i = 1:y_max
if(forests(i,j) == 1) %Plot Green grass
rectangle ('position',[i-0.5,j-0.5,MapRes,MapRez],'FaceColor',ForColor)
hold on
end
getting this error
if(forests(i,j) == 1) %Plot Green grass
1 Kommentar
Alex
am 30 Sep. 2014
sorry this is the error: Subscript indices must either be real positive integers or logicals.
Kategorien
Mehr zu Desktop finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!