Help plotting two lines on same graph

3 vues (au cours des 30 derniers jours)
Jenny Briggs
Jenny Briggs le 12 Mar 2016
Commenté : Jenny Briggs le 12 Mar 2016
Hi, I want to plot these two lines on the same graph:
plot((1/2)*[pl(1),pr(1)], (1/2)*[pl(1),pr(1)]);
plot([pr(1),(1/2)*pr(1)], [pl(2), (1/2)*pr(1)]);
Where pr=[0;0]
and pl=[1;0]
Any help would be greatly appreciated, Thanks

Réponse acceptée

Ced
Ced le 12 Mar 2016
Call "hold on" after the first plot. Also, you could use the "line" function instead of "plot" here if you like.
  1 commentaire
Jenny Briggs
Jenny Briggs le 12 Mar 2016
Thank you so much!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by