Filter löschen
Filter löschen

Using mat2cell

13 Ansichten (letzte 30 Tage)
Sebastian Daneli
Sebastian Daneli am 23 Jan. 2022
Kommentiert: Sebastian Daneli am 23 Jan. 2022
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.

Akzeptierte Antwort

Matt J
Matt J am 23 Jan. 2022
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}

Weitere Antworten (1)

Stephen23
Stephen23 am 23 Jan. 2022
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 Kommentar
Sebastian Daneli
Sebastian Daneli am 23 Jan. 2022
Looks great, thanks.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by