[EDIT: 20110728 14:37 CDT – reformat – WDR]
Hello.. my question is: How to write programming code asking to return to the previous step i.e if A=B; we hv to return to step 2 (do all over again starting from step 2). my code is
for s = 1:23 d{s,1} = b{s,1}*(b{s,1})'; A{s,1} = eig(d{s,1}); %Find the eigenvalues
anyNegativeA = any(A(:)<0); %thanks to 'the cyclist' for the code..
if anyNegativeA; %checking if there's any entries in -ve value.
B = A*2; end end
…and now, what's the command asking to repeat the 'find the eigenvalues' step
Best Answer