Need help to vectorize a for loop
Ältere Kommentare anzeigen
Pls help... how to vectorise this for loop
unimodal=[28 42 46 49 52 55 58 61 64 68 82]
for n=1:11
ru(n)=(unimodal(n)-min(unimodal))/(max(unimodal)-min(unimodal));
end
for n=1:11
fu(n)=(n-1)/(length(unimodal)-1)
end
for n=1:11
ju(n)=0.5*ru(n)+0.5*fu(n);
end
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Statics and Dynamics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!