Plotting two .m files on one graph
이전 댓글 표시
I keep plotting 2 .m files on one graph but they keep plotting on separate graphs. I used hold on on one of the files.
답변 (1개)
Bhaskar R
2020년 1월 31일
Maintain same figure value in both files. suppose
file_1.m
figure(1) % figure 1
plot(1:100)
hold on
file_2.m
figure(1) % same figure handle
file_1; % calling first file
plot(2*[1:100]);
legend('show')
댓글 수: 1
Rik
2020년 1월 31일
Or change the m files to functions that accept a figure or axes handle as an input.
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!