Hi sir, i attached one code,please show hw to save result from for loop

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 25 Aug. 2015
Bearbeitet: Walter Roberson am 25 Aug. 2015
k(i) = ui(i)+ui(i+1)/2;

2 Kommentare

hi sir,i attached one code please say how to find its index
op=[2 4 6 8];
q=max(op);%its answer is 8,how to find its index 4
op=[2 4 6 8];
[q, qidx] = max(op);
Just like I already showed you.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements 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!

Translated by