A=[-0.1;1;-5;-0.8;-0.4];tto=find(A == max(abs(A)))tt=find(A ~= max(abs(A)))
I want to find index of largest magnitude in array and put it in 'tto'.
And put rest indices in tt
result should be
tto=3tt=[1;2;4;5]
find largest magnitude in array
A=[-0.1;1;-5;-0.8;-0.4];tto=find(A == max(abs(A)))tt=find(A ~= max(abs(A)))
tto=3tt=[1;2;4;5]
Best Answer