i had tried this, but i doesn't give me what i want,
maxi=x(1);
for i=1:length(x)
%
if x(i)>maxi
maxi=x(i);
indice=i;
else
maxi=maxi;
indice=i;
end
end
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!