Retrieving data for a calculated plot

Hello
I created the differential plot attached with Matlab. Is it possible to retrieve the derivative data it used or do I need to calculate it myself?
G

5 件のコメント

Monica Roberts
Monica Roberts 2022 年 5 月 17 日
Does this help?
f = openfig("1wavevec.fig"); % Figure handle
a = f.Children; % Axes handle
lines = a.Children; % Handles of all the lines
xdata = [];
ydata = [];
for i = 2:numel(lines) % The first line is a different length than the rest
xdata = [xdata;lines(i).XData];
ydata = [ydata;lines(i).YData];
end
Gavin Seddon
Gavin Seddon 2022 年 5 月 17 日
Yes, thanks. It has given the data.
G
Gavin Seddon
Gavin Seddon 2022 年 7 月 30 日
Hello Monica
I need to use this data but there is errors, can you help?
G
Gavin Seddon
Gavin Seddon 2022 年 7 月 31 日
these are the errors
CircHist wave.tab
Error using CircHist
The value of 'data' is invalid. Expected input to be one of these types:
double, single, uint8, uint16, uint32, uint64, int8, int16, int32, int64, cell
Error in CircHist (line 534)
parse(pr,data,varargin{:});
>> CircHist (xdata, ydata)
Error using CircHist
The value of 'edges' is invalid. Expected input to be a vector.
Error in CircHist (line 534)
parse(pr,data,varargin{:});
>> CircHist wave.tab(xdata, ydata)c
Error using CircHist
The value of 'data' is invalid. Expected input to be one of these types:
double, single, uint8, uint16, uint32, uint64, int8, int16, int32, int64, cell
Error in CircHist (line 534)
parse(pr,data,varargin{:});
the data are vectors, is this a problem since the hist is angle and deviations
Star Strider
Star Strider 2022 年 7 月 31 日
I looked at the data in this file.
One way to recover the 5003 Line objects is:
filename = '1wavevec.fig';
F = openfig(filename);
Ax = gca;
Lines = findobj(gca, 'Type','Line')
for k=1:numel(Lines)
xv{k,:} = Lines(k).XData;
yv{k,:} = Lines(k).YData;
end
However the rest of it makes essentially no sense. It appears to be entirely made up of collinear quiver arrows and nothing else. I have no idea how to recover any information other than the quiver arrows that comprise each line.
It will likely be necessary to calculate whatever data were used to create this plot and use that, or re-plot the existing data without using the quiver function. I doubt that anything meaningful can be recovered from the file as it exists here.
.

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

 採用された回答

Gavin Seddon
Gavin Seddon 2022 年 8 月 2 日

0 投票

Thanks but I need to get theangle the fig rotates through but that is off topic.
G

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

質問済み:

2022 年 5 月 17 日

回答済み:

2022 年 8 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by