I'm trying to display the current vector being used in my script.
I have a 'for loop' for an iteration and upon each change in the parameter
alpha = [0.5, 0.7, 0.85, 0.9, 0.95, 0.99];
I use
disp(['alpha: ' num2str(alpha)])
and this outputs alpha: 0.5 etc for each one which is fine.
Now I'm also have another inner for loop changing the vector upon the iteration. The vectors are named
ri = [r1, r2, r3];
To which have already been defined. Now as above with disp... alpha. I wish to display which current vector is being used. The same method of num2str doesn't work. Probably as it is a vector. I just want the value r1, etc to be displayed.
alph = [0.5, 0.7, 0.85, 0.9, 0.95, 0.99];
ri = [r1, r2, r3];
for alpha = alph,
disp(['alpha: ' num2str(alpha)])
for r = ri, %
for k = 1:200,
(code takes up too much room, just an iteration)
end
disp(['number of iterations: ' num2str(k)])
******
end
end
I also want to include at ***** display vector r1 or r2 or r3
r1,r2etc are column vectors? - Luis Mendo