ginput and plot data
Mostra commenti meno recenti
Hi, i have a question:
When i click near of a pointF (pointF is a point that belongs to the function plotted on the graph), is there a way that "ginput" gives me that pointF?
Example: "ginput" gives me (37.8, 251.3), but the point that belongs to the function plotted is (38, 250), i need that "ginput" gives me (38,250) when i click on (37.8, 251.3)
Regards, and sorry for my Tarzan english xD
Risposta accettata
Più risposte (1)
Stefano Dalla Gasperina
il 10 Set 2020
% plot x,y
plot(x,y)
% ginput 10 points
plot(y)
[index,~] = ginput(10);
% plot again
figure();
plot(x(round(index)),y(round(index)));
Categorie
Scopri di più su Data Exploration in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!