at which piont i have the minimum value

조회 수: 1 (최근 30일)
hassan alolaiwee
hassan alolaiwee 2019년 11월 13일
답변: Fangjun Jiang 2019년 11월 13일
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

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2019년 11월 13일
[t,index]=max(z);
value=i(index)

카테고리

Help CenterFile Exchange에서 Animation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by