How can I plot certain columns of a matrix?

5 ビュー (過去 30 日間)
Maus
Maus 2017 年 8 月 25 日
コメント済み: Leo Martinez-Silva 2020 年 6 月 15 日
Hi, I have a matrix which consists of 6000 rows and 200 columns. I want to plot all rows and - e.g. - the columns 1 to 10, 25 und 150 to 155. How do I have to write the command to plot those columns? I tried things like
plot(A(:,1:10,25,150:155));
but of course it doesn't work. Can anybody help me?

採用された回答

John D'Errico
John D'Errico 2017 年 8 月 25 日
編集済み: John D'Errico 2017 年 8 月 25 日
plot(A(:,[1:10,25,150:155]))
So pretty basic matrix indexing, as well as how to create a vector. You need to learn to create the vector of indexes. You can see that here:
[1:10,25,150:155]
Perhaps you need to read the getting started tutorials? Reading the manual is not a bad thing.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by