add data points to a graph

조회 수: 353 (최근 30일)
maryam
maryam 2013년 9월 25일
답변: harsh raval 2021년 10월 18일
hi i have a matlab figure, and i'd like to highlight some important points on it, could anybody help me? tnx in advance

채택된 답변

David Sanchez
David Sanchez 2013년 9월 25일
Select the "Data Cursor" on the figure window and click on the point you want.
Hold "alt" to multiple selection.
  댓글 수: 2
Youssef  Khmou
Youssef Khmou 2013년 9월 25일
Good answer,
maryam
maryam 2013년 9월 26일
It really helps. thank you very much

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

추가 답변 (2개)

Youssef  Khmou
Youssef Khmou 2013년 9월 25일
편집: Youssef Khmou 2013년 9월 25일
you have to know the xy coordinates of those points to mark them . suppose i have a graph Y(X) :
X=1:10;Y=randn(1,10);
plot(X,Y), hold on,
Marked=[X(2) Y(2); X(4) Y(4)];
plot(Marked(:,1),Marked(:,2),'o');
  댓글 수: 1
maryam
maryam 2013년 9월 26일
tnx for ur answer,but i dont know the xy coordinates,just a figure.

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


harsh raval
harsh raval 2021년 10월 18일
folowing is an example where i have highlited a point with red airstrike
function m = plot_cos(y, t)
plot(t,y,'b--')
hold on
[iminy,idy]=min(y);
plot(idy,iminy,'r*')
hold off
m=min(y);
end

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by