delete column from matrix
2 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
I have a matrix 6964x1441. I would like to keep the column every 24 (keep column 24, 48, 72 etc) and delete the other which will create a matrix 6964x60. Can someone help me pelase?
regards
Jonathan
0 件のコメント
採用された回答
Stephen23
2020 年 9 月 17 日
Where M is your matrix:
M = M(:,24:24:end)
3 件のコメント
Stephen23
2020 年 9 月 17 日
"I have 15 matrices (6964x1441) and I want all of them to be (6964x60)... Do you know if a loop could do that for all of them?"
C = {M1, M2, M3, ..., M15};
for k = 1:numel(C)
C{k} = C{k}(:,24:24:end);
end
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!