フィルターのクリア

Extracting Data from a .fig File

7 ビュー (過去 30 日間)
Eli Wolkenstein
Eli Wolkenstein 2022 年 10 月 27 日
回答済み: Star Strider 2022 年 10 月 27 日
I have this MATLAB figure that I would like to extract the data that made it into a .txt or excel file. It has 7 subplots in it, so i would want the data file to has 8 colums, one for the x values and the corresponding 7 y values. Am I able to do that? And if yes, how?

回答 (1 件)

Star Strider
Star Strider 2022 年 10 月 27 日
This should do what you want —
F = openfig(websave('Group10%20heating','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1171588/Group10%20heating.fig'));
Kids = F.Children;
for k = 1:numel(Kids)
yv(k,:) = Kids(k).Children.YData;
end
xv = Kids(1).Children.XData;
The ‘yv’ array are the YData vectors for each subplot, and the ‘xv’ vector is the common independent variable vector for all of them.
.

カテゴリ

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

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by