Effacer les filtres
Effacer les filtres

How can I plot two matrices together with different legs

1 vue (au cours des 30 derniers jours)
Seyed Sahand Mohammadi Ziabari
Modifié(e) : Matt J le 8 Jan 2018
How can I plot two matrices with the same size (1200*12) together with different legs(12+12=24)?

Réponse acceptée

Matt J
Matt J le 8 Jan 2018
Modifié(e) : Matt J le 8 Jan 2018
Just concatenate the two matrices and plot them as one,
plot([Data1,results])
leg1=arrayfun(@(i) ['Data1-',num2str(i)],1:12,'uni',0);
leg2=arrayfun(@(i) ['results-',num2str(i)],1:12,'uni',0);
legend(leg1{:},leg2{:});
  2 commentaires
Seyed Sahand Mohammadi Ziabari
It just shows one of them Data1 at the leg!
Matt J
Matt J le 8 Jan 2018
Modifié(e) : Matt J le 8 Jan 2018
Not for me...

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