フィルターのクリア

How can I access the data used to create my plot from the FIG file?

1 回表示 (過去 30 日間)
I would like to access the data that was used to create the plot in the attached FIG-file.
Is the data embedded in the file?

採用された回答

MathWorks Support Team
MathWorks Support Team 2018 年 4 月 26 日
The figure in the attached FIG file contains a surface object and a series of line objects represented by "+" and "." markers. It is possible to access the 3D data used to create the surface object in the following manner :
m=open('filename.fig') %where filename is the FIG file
c=findobj('type','surface');
x=get(c);
The fields XData,YData and ZData of the structure "x" will now contain the data you require.
You may also access the data used to create the line objects in the following manner:
m=open('filename.fig')
c=findobj('type','line');
for ind=1:length(c)
lobj(ind)=get(c(ind));
end
Since there are many different line objects in this case, I accumulate each one of them into an array of structure.For example :
lobj(1).XData
will be the XData of the first line object and so on.
You may also access this data using the plot browser. To do this, open the figure by typing :
m=open('filename.fig')
Go to the View menu of the figure and select "Plot Browser". Go to the Desktop menu of the figure and select the "Property Editor". You may now click on any object in the Plot Browser and view its Properties in the Property Editor by clicking on more properties.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVisual Exploration についてさらに検索

製品


リリース

R2006a

Community Treasure Hunt

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

Start Hunting!

Translated by