getting x values by clicking on axes
3 ビュー (過去 30 日間)
古いコメントを表示
Hi all!
I have the set of (x,y) data:
x=[4 10 25 30 37 45 58 77 81 89 93 100 113 122 130 137 145 152 160 163]; y=[15 24 7 45 35 58 71 22 64 10 21 35 67 50 59 63 77 43 40 5];
After plotting it, I want to be able to get x values in t vector by clicking on the axes.
How can i do it?
2 件のコメント
per isakson
2013 年 5 月 4 日
Why clicking on the axes? Why not by clicking on the curve?
Search for "Data Cursor" in the on-line help.
回答 (2 件)
Azzi Abdelmalek
2013 年 5 月 4 日
Click on your plot the add this code
x=get(gco,'xdata')
y=get(gco,'ydata')
15 件のコメント
参考
カテゴリ
Help Center および File Exchange で Graphics Object Properties についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!