![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/172185/image.png)
add data points to a graph
157 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
hi i have a matlab figure, and i'd like to highlight some important points on it, could anybody help me? tnx in advance
0 Commenti
Risposta accettata
David Sanchez
il 25 Set 2013
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/172185/image.png)
Select the "Data Cursor" on the figure window and click on the point you want.
Hold "alt" to multiple selection.
Più risposte (2)
Youssef Khmou
il 25 Set 2013
Modificato: Youssef Khmou
il 25 Set 2013
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');
harsh raval
il 18 Ott 2021
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
0 Commenti
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!