plot columns of matrix
4 ビュー (過去 30 日間)
古いコメントを表示
suppose I have a 4x100 matrix Ctrack. The four rows each correspond to a different variable, and they change with time from one column to the next. How would I plot it so that on the same plot i have four different curves showing how each variable changes across the different columns?
0 件のコメント
回答 (1 件)
Geoff Hayes
2019 年 5 月 1 日
編集済み: Geoff Hayes
2019 年 5 月 1 日
...
If Y is a matrix, then the plot function plots the columns of Y versus their row number. The x-axis scale ranges from 1 to the number of rows in Y.
In your case, you want to plot the rows of Y versus their column number. So perhaps try transposing the data and do as
plot(Ctrack');
0 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!