フィルターのクリア

Divide a square matix with given rows or column index

1 回表示 (過去 30 日間)
Chugh
Chugh 2018 年 11 月 14 日
編集済み: madhan ravi 2018 年 11 月 14 日
Hi,
I have a square matix of size 10 x 10. I want to partition it by using given index of two rows and columns e.g. 2, 7. In that way, I will have seveal blocks of matrices. How do I get it?

採用された回答

Matt J
Matt J 2018 年 11 月 14 日
編集済み: Matt J 2018 年 11 月 14 日
Let's say your matrix is A.
>> blocks = mat2cell(A,[2,8],[2,8])
blocks =
2×2 cell array
{2×2 double} {2×8 double}
{8×2 double} {8×8 double}
  2 件のコメント
Matt J
Matt J 2018 年 11 月 14 日
編集済み: Matt J 2018 年 11 月 14 日
Can't you just modify my example, changing the partitioning parameters to whatever it is you want?
madhan ravi
madhan ravi 2018 年 11 月 14 日
編集済み: madhan ravi 2018 年 11 月 14 日
+1 meets all the requirements OP asked for

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by