How to combine 2 graphs from different scripts in another script
이전 댓글 표시
Hello everyone, I am trying to combine 2 graphs, ech made in a different script, in another script. I used the code written underneath. However when I run the code it gives an error that it can't find the figures that I made. Can someone tell me what I did wrong and how to make this work? Thanks in advance!
%graph 1
fg1 = figure;
hold on
plot(Q,h);
xlabel('Debiet[m³/s]');
ylabel('Opvoerhoogte [m]');
%graph 2 in another script
fig2 = figure;
hold on;
curve_head_debiet = plot(G_debiet_int,G_head_int);
curve_head_debie2_2 = plot(n_IP*G_debiet_int,G_head_int);
xlim([0 650]);
ylim([0 70]);
xlabel('Debiet [m³/h]');
ylabel('Head [m]');
%combined graph in another script
pompgrafiek = openfig("fg1.fig");
leidingsgrafiek = openfig("fg2.fig");
copyobj(get(gca(leidingsgrafiek),'Children'), gca(pompgrafiek));
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



