plot(x,y(1,:) meaning
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I'm new matlab. I was wondering what the y(1,:) means?
I have ran this code: plot(x,y(1,:),'r-o',x,y(2,:),'g*','LineWidth',2) and can't make sense of the 1 and 2 in regards to the y coordinate.
Thanks
3 commentaires
Stephen23
le 26 Oct 2019
I'm new matlab. I was wondering what the y(1,:) means?
I have ran this code: plot(x,y(1,:),'r-o',x,y(2,:),'g*','LineWidth',2) and can't make sense of the 1 and 2 in regards to the y coordinate.
Thanks
Réponses (1)
Star Strider
le 5 Oct 2019
Modifié(e) : Star Strider
le 5 Oct 2019
EDIT —
To illustrate:
y = [1 2 3 4 5; 6 7 8 9 10]
FirstRow = y(1,:)
SecondRow = y(2,:)
produces:
y =
1 2 3 4 5
6 7 8 9 10
FirstRow =
1 2 3 4 5
SecondRow =
6 7 8 9 10
0 commentaires
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!