max co-ord on graph

I have a 2D line graph (X and Y). X is a variable, Y has no variable assigned. I just want to show the co-ordinates of the peak as I am trying to show that it will peak when Y = 1.
How?
Thanks

댓글 수: 1

the cyclist
the cyclist 2013년 2월 25일
You have no Y data. What is it that is going to peak when Y=1?
Please add some details. You have not described your problem clearly enough (at least not for me to understand it).

댓글을 달려면 로그인하십시오.

답변 (1개)

Thorsten
Thorsten 2013년 2월 25일

0 개 추천

[Y_peak ind] = max(Y)
X_peak = X(ind);
disp(['Function peaks at X = ' num2str(X_peak) ...
' with value ' num2str(y_peak) '.'])

댓글 수: 2

Krystina
Krystina 2013년 2월 25일
error no Y defined?
Thorsten
Thorsten 2013년 2월 25일
How can you say "I have a 2D line graph (X and Y)." when Y is undefined? Either you need to define Y or to rephrase your question.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

질문:

2013년 2월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by