Select sample from an array

15 ビュー (過去 30 日間)
Joana
Joana 2021 年 2 月 18 日
回答済み: Jeff Miller 2021 年 2 月 18 日
Hello
I have an array of 200x259 samples. I need to make a new array of all the rows but for column i have to reject 3 samples in the following order:
Reject sample 1, 6 and 7..
Reject sample 8, 13 and 14
Reject 15, 20, 21 and so on until
reject 253, 258 and 259
x= ones(200x259)
X1=x(:, [2:5 9:12 16:19 23:26 30:33 37:40......)
How can i do this in decent way.?

採用された回答

Jeff Miller
Jeff Miller 2021 年 2 月 18 日
Maybe this:
ints = [2:7:259 3:7:259 4:7:259 5:7:259];
srtints = sort(ints);
X1 = x(:,srtints);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by