For Loop for storing data
1 回表示 (過去 30 日間)
古いコメントを表示
How would I write a for loop to extract columns from a large matrix and put it into a new matrix. For example, I want to take every 6th column of my very large matrix and store it in a new matrix.
Thanks!
0 件のコメント
回答 (1 件)
James Tursa
2016 年 11 月 12 日
編集済み: James Tursa
2016 年 11 月 12 日
No loop needed:
a = your very large matrix
b = a(:,1:6:end); % every 6th column, starting with 1st column
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!