Using mat2cell

8 ビュー (過去 30 日間)
Sebastian Daneli
Sebastian Daneli 2022 年 1 月 23 日
コメント済み: Sebastian Daneli 2022 年 1 月 23 日
This is the third time that I'm forced to write a question about mat2cell since the explanation Matlab gives about said command offers no insight. I have a 2840x256, and I would like create 20 cells, each of 142*256. Is there any alternative to mat2cell, since I cannot understand how this command work.

採用された回答

Matt J
Matt J 2022 年 1 月 23 日
You can use mat2tiles from,
Example:
A=rand(2840,256);
Acell=mat2tiles(A,[142,256])
Acell = 20×1 cell array
{142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double}
  1 件のコメント
Sebastian Daneli
Sebastian Daneli 2022 年 1 月 23 日
Thanks.

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

その他の回答 (1 件)

Stephen23
Stephen23 2022 年 1 月 23 日
M = rand(2840,256);
C = mat2cell(M,142*ones(1,20),256)
C = 20×1 cell array
{142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double} {142×256 double}
  1 件のコメント
Sebastian Daneli
Sebastian Daneli 2022 年 1 月 23 日
Looks great, thanks.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by