plotting an array skipping some columns

I have a matrix T(x,t) = T(position, time), The final matrix comes as 101x1000 , I don't want to plot for all 1000 columns, I want to skip 20 cols in the plot!
Can anyone suggest me something! Thanks
clc
clear all;
%-----------------------------Input----------------------------------------
%-----------------------------Plot-----------------------------------------
figure
plot(x,T)
title('1')
Thanks

 採用された回答

Aquatris
Aquatris 2020 年 3 月 5 日
編集済み: Aquatris 2020 年 3 月 5 日

1 投票

If you know which columns you want;
desiredColumnIndex = [1 23 35 67 70 83];
plot(x,T(:,desiredColumnIndex))
If you want every 20th column;
plot(x,T(:,1:20:end))

その他の回答 (0 件)

カテゴリ

製品

リリース

R2019b

タグ

質問済み:

2020 年 3 月 5 日

編集済み:

2020 年 3 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by