Is there a way to select certain point in matlab plot by interpolation?

43 ビュー (過去 30 日間)
yc j
yc j 2015 年 6 月 3 日
コメント済み: yc j 2015 年 6 月 15 日
Hi, I am having a trouble in selecting a point in plot.
For example, I have data file with x = [1 2] and y = [5 10].
After ploting x and y, I want to select the point where x = 1.5. Of course since my data only has 1 and 2 as the x values, the data cursor won't pick up x=1.5.
Is there anyway I can quickly see the y-value when x=1.5?
I have about 500 data files in which I have to do something like above and can't afford to do interpolation everytime...
  2 件のコメント
Walter Roberson
Walter Roberson 2015 年 6 月 3 日
How are you doing the "selecting" at the moment?
yc j
yc j 2015 年 6 月 3 日
編集済み: yc j 2015 年 6 月 3 日
I have this m file which will ask for the data file when i press F5. After selecting the data file, the m file will calculate and plot the data. Here, I press "data cursor" at the top side of the plot, and select the points near the point of interest. For example, I want y-value when x=1.3, but the data cursor will only allow me to select x=1 and x=1.5... I guess this is because whatever the calculations the m file is doing, it gives plot by x= 0.5 increase..

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2015 年 6 月 3 日
When you create the data cursor on screen, right click on it. In the menu that comes up, hover over the first item, Selection Style, and move your mouse to the right of that line to bring up the pop-up menu at the right side. On that popup menu, choose "Mouse Position" instead of "Snap to Vertex".
  1 件のコメント
yc j
yc j 2015 年 6 月 15 日
OMG!!! thank you so much!!!!!!!!!!!!!! sorry for the late reply. This is huge for my work. Thank you!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Properties についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by