Plotting two .m files on one graph
Afficher commentaires plus anciens
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 commentaire
Megan Mirkhanian
le 31 Jan 2020
Réponses (1)
Bhaskar R
le 31 Jan 2020
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 commentaire
Rik
le 31 Jan 2020
Or change the m files to functions that accept a figure or axes handle as an input.
Catégories
En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!