Combining two figures in MATLAB

3 Ansichten (letzte 30 Tage)
Sarah
Sarah am 20 Okt. 2011
Hey everyone. I am trying to combine these two figures together, but it keeps giving me the following error.
??? Error using ==> copyobj Invalid handle
Help would be much appreciated (:
figure(2);
clf;
subplot(1,1,1); plot(TPV1.Num,TPV1.TriSig,'b.-')
datetick('x',26,'keepticks');
grid on;
title('TPV1 v Time - ORIGINAL')
figure(3);
clf;
subplot(1,1,1); plot(TSP1.Num,TSP1.TriSig,'--r')
datetick('x',26,'keepticks');
grid on;
title('TPV1/TSP1 v Time - ORIGINAL')
H = findobj(2,'type','line');
copyobj(L,findobj(3,'type','axes'));
Legend = legend('TPV1','TSP1',2);
set(h,'Interpreter','none')

Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 21 Okt. 2011
You may just have a typo.
You want to copy H, right? What is L in the copyobj() line?
Also, what is h in the last line?
  1 Kommentar
Sarah
Sarah am 27 Okt. 2011
Yes, it was a typo. Thanks a lot.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by