Hello, i clicked through the answers, but it didnt help.
What am i trying to do? Put for each round of the loop two values in file. Overall 9 rounds, two values each -> 18 values
What have i done? – I've created two 9×6 matrices called xwerte and ywerte
– I've created two arrays called xd_ref and yd_ref
Script looks like this:
% Loop goes trough each row
for j=1:length(xwerte) % loope goes through each column of specific row
for i=1:length(xwerte(j,:)) % Simple function that gives out two values and puts it into file
[S, ab] = dist_pt2refTraj(xwerte(j,i), ywerte(j,i), xd_ref, yd_ref); save('trajektorien.mat', 'S', 'ab'); if ab > 20 error('Error. \n ab is to big') end end end
If i click on run, i get in my file only two values, not 18.
How can i debug through each loop? Or whats the problem here?
Thanks a lot.
Best Answer