How to read every i data in the UIAXES plotted data ?

16 ビュー (過去 30 日間)
farzad
farzad 2020 年 11 月 26 日
コメント済み: Geoff Hayes 2020 年 11 月 28 日
Hi All
I have got a plot in my aap designer window, and after plotting some 2D data on it, I want to read and save only some specific data from this plot and not whole of it how do I do that
app.UIAxes.Children(i).YData = somefunction(b, a, app.UIAxes.Children(i).YData);
or somehow I should have access to numerical values in YData
I am trying the following but not succeeding, I have more than one plot
for i=1:numel(app.UIAxes.Children)
app.fitY = [app.fitY; app.UIAxes.Children(i).YData];
app.fitt = [app.fitt; app.UIAxes.Children(i).XData];
assignin('base','appdatay',app.UIAxes.Children(i).XData)
assignin('base','appdatax',app.UIAxes.Children(i).YData)
app.UIAxes.Children(i).YData = app.UIAxes.Children(i).YData(1:redrate:numel(app.fitY));
end
  8 件のコメント
farzad
farzad 2020 年 11 月 27 日
I am stuck in an urgent situation
Geoff Hayes
Geoff Hayes 2020 年 11 月 28 日
farzad - you may need to show some or all of your code. If you are using plot to plot the data, then just maintain/save the handle to the plot (or the line object depending upon your version of MATLAB) and then use this handle to get the data you want. i.e.
hPlot = plot(1:10,11:20);
xData = get(hPlot, 'xdata');
yData = get(hPlot, 'ydata');

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by