How to plot multiple Y in the form of samples in the same X
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Richard Perosa Fernandes
le 16 Avr 2018
Commenté : Richard Perosa Fernandes
le 16 Avr 2018
I have alot of samples with different X and Y, like this:
...and I want to plot one graphs with Y (samples) and X like this:
I know how to make this graph manually, but I have 350 samples... so it's kind hard. I can join every x with outerjoin, but i really don't know how can I plot.
3 commentaires
Réponse acceptée
Shounak Shastri
le 16 Avr 2018
Modifié(e) : Shounak Shastri
le 16 Avr 2018
Try this,
plot(x1, y1, 'r*', x2, y2, 'yo', x3, y3, 'ks');
Here, I have taken (x, y) from a1 as (x1, y1), (x, y) from a2 as (x2, y2), and so on.
And then you can use
legend('a1', 'a2', 'a3');
This will indicate the colours you have used to denote the values.
Best of luck.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Graphics Object Identification 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!