MATLAB Answers

0

at which piont i have the minimum value

Asked by hassan alolaiwee on 13 Nov 2019 at 16:19
Latest activity Answered by Fangjun Jiang
on 13 Nov 2019 at 16:30
hello,
if i have
i= pi/2:pi/4:pi;
z = sin(i)
t = max(z)
the matlab will give me
z = [1,0.707106781186548,1.224646799147353e-16]
t = 1
so, at i = pi/2 , t has the max value
so, the question is: how to mke matlab give me the point that has the max value?which is in previous example pi/2
thank you

  0 Comments

Sign in to comment.

1 Answer

Answer by Fangjun Jiang
on 13 Nov 2019 at 16:30

[t,index]=max(z);
value=i(index)

  0 Comments

Sign in to comment.