Not able to extract data from fig file having subplots

11 次查看(过去 30 天)
There are 7 subplots in my fig file , am able to extract data from all but not able to extract data from 6 fig .
Could anyone tell me why the 6th subplot data am not able to extract am using this code.Once i execute the command
the data gets vanished from the figure file
clc
clear all
h=findobj(subplot(7,1,6),'Type','line');
x=get(h,'Xdata');
y=get(h,'Ydata');
for i =1:size(y)
z{i,1}=(y{i,1}');
end
  8 个评论
Ameer Hamza
Ameer Hamza 2020-10-8
Without knowing what is present in subplot 6, it is difficult to suggest a solution. The children property tells what type of object is children of that axes.
VBBV
VBBV 2020-10-11
编辑:VBBV 2020-10-11
clc
clear all
ax = subplot(7,1,6)
h=findobj(ax,'Type','line');
x=get(h,'Xdata');
y=get(h,'Ydata');
for i =1:size(y)
z{i,1}=(y{i,1}');
end
use the property, value type arguments for findobj . pass the handle of subplot to findobj

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Specifying Target for Graphics Output 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by