plot(x,y(1,:) meaning
6 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Stephen23
2019 年 10 月 26 日
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
回答 (1 件)
Star Strider
2019 年 10 月 5 日
編集済み: Star Strider
2019 年 10 月 5 日
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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!