How to input multiple lines on a graph
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ashley Megow
le 22 Oct 2020
Réponse apportée : Monisha Nalluru
le 28 Oct 2020
I imported my data from excel, and i want to compare to different y values on a line graph. How to i add the second y value
Réponse acceptée
Monisha Nalluru
le 28 Oct 2020
As a example
x = linspace(-pi,pi);
y1 = sin(x);
y2 = cos(x);
plot(x,y1); % first line
hold on
plot(x,y2); % second line
hold off
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!