save 3D figure obtained with 'findobj'

2 Ansichten (letzte 30 Tage)
Alberto Acri
Alberto Acri am 23 Nov. 2022
Beantwortet: Walter Roberson am 24 Nov. 2022
Hi. I would like to save the figure I get using the 'findobj' function.
I have this code and I want to save the last figure that is shown on the screen:
fig_1 = openfig("fig1.fig");
fig_2 = openfig("fig2.fig");
fig_3 = openfig("fig3.fig");
fig_4 = openfig("fig3.fig");
L1 = findobj(fig_1,'type','line');
copyobj(L1,findobj(fig_4,'type','axes'));
L2 = findobj(fig_2,'type','line');
copyobj(L2,findobj(fig_4,'type','axes'));
destdirectory_FIG = 'C:\Users\Alberto\Desktop\....';
savefig(L2, fullfile(destdirectory_FIG, 'name_of_FIG.fig')); % ???
Can anyone tell me how to modify the code?
  3 Kommentare
Alberto Acri
Alberto Acri am 24 Nov. 2022
@Walter Roberson Is it possible to get the same figure in such a way that it can be saved?
Walter Roberson
Walter Roberson am 24 Nov. 2022
you findobj line and axes but not figures, so there is no "same figure"

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Walter Roberson
Walter Roberson am 24 Nov. 2022
savefit(fig_4, fullfile(destdirectory_FIG, 'name_of_FIG.fig'))

Kategorien

Mehr zu Printing and Saving finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by