How to extract data from a plot for various values of X and Y axis?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have a speed vs time plot. Now I have to extract the speed data for a particular time which is used in a 'for loop'.
For example: for t=0:1:10
First iteration, I have to get the speed data for t=0;
Second iteration obtain the value of speed @ t= 1 sec ...... and so on...
2 Commenti
Risposte (1)
Sathyanarayan Rao
il 7 Set 2017
speed = [1 2 3 4 5]
time = [0.03 0.05 0.07 0.09 0.1]
h = plot(time,speed);
xdata = (get(h, 'XData'))
ydata = (get(h, 'YData'))
Vedere anche
Categorie
Scopri di più su Annotations 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!