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

 Accepted Answer

k(i) = ui(i)+ui(i+1)/2;

2 Comments

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.

Sign in to comment.

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!