Grouping rows into different matrices

2 ビュー (過去 30 日間)
omar najjar
omar najjar 2021 年 3 月 4 日
編集済み: Stephen23 2021 年 3 月 4 日
I have a matrix of 2000*512 and I want to assign each 10 to a matric so with total of 200 matrices
G1 = M(1:10 , :)
G2 = M(11:20, :) and so on
How can I do it in more professional way since I need to reach to G200
Please Help
  1 件のコメント
Stephen23
Stephen23 2021 年 3 月 4 日
編集済み: Stephen23 2021 年 3 月 4 日
"How can I do it in more professional way since I need to reach to G200 "
The "more professional way" would be to avoid numbered variables entirely and use a simple cell array.

サインインしてコメントする。

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2021 年 3 月 4 日
編集済み: KALYAN ACHARJYA 2021 年 3 月 4 日
G=mat2cell(M,10*ones(1,2000/10))
All are individual matrices, you have to save matrices in the cell array (easiest way)

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by