resize cell in different dimension

13 visualizzazioni (ultimi 30 giorni)
komal bharti
komal bharti il 14 Set 2017
Commentato: James Tursa il 14 Set 2017
i have a cell of size 20*1 . i want to convert them into 10*2 .

Risposte (1)

James Tursa
James Tursa il 14 Set 2017
Modificato: James Tursa il 14 Set 2017
Assuming you mean you want to reshape the cell array itself, and not the contents of the cell array:
mycell = your 20x1 cell array
result = reshape(mycell,10,2);
Or if you wanted the results arranged differently in the rows, then maybe this is what you need:
mycell = your 20x1 cell array
result = reshape(mycell,2,10).';
  2 Commenti
komal bharti
komal bharti il 14 Set 2017
i want first 10 data in in first row and last 10 data in second row .
James Tursa
James Tursa il 14 Set 2017
result = reshape(mycell,10,2).';

Accedi per commentare.

Categorie

Scopri di più su Data Types in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by