fig=struct();
fig3 = figure;
fig4 = figure;
for items_b=1:length(data_name)
fig(items_b).x1 = openfig([aim,'\',strrep('ty stationw','w',data_name(items_b)),figure_type]);
fig(items_b).ax1 = fig(items_b).x1.CurrentAxes;
fig(items_b).s1 = subplot(4, 2, items_b, 'Parent', fig3);
fig(items_b).fig1 = fig(items_b).ax1.Children;
copyobj(fig(items_b).fig1, fig(items_b).s1);
fig(items_b).x2 = openfig([aim,'\',strrep('noty stationw','w',data_name(items_b)),figure_type]);
fig(items_b).ax2 = fig(items_b).x2.CurrentAxes;
fig(items_b).s2 = subplot(4, 2, items_b, 'Parent', fig4);
fig(items_b).fig2 = fig(items_b).ax2.Children;
copyobj(fig(items_b).fig2, fig(items_b).s2);
end
Best Answer