How to seperate a cell?

Hi everyone! I've got a cell like this
[ 17x2 double]
[2042x2 double]
[ 7x2 double]
[ 9x2 double]
[ 7x2 double]
[ 3x2 double]
[ 4x2 double]
[ 7x2 double]
[ 2x2 double]
[ 23x2 double]
[ 28x2 double]
now i'd like to seperate each n x m matrix. It should look like this
a1 = [17x2 double]
a2 = [2042x2 double]
...
Does anyone know how to do so? thanks

Respuestas (2)

Vivek
Vivek el 16 de Mayo de 2014
Editada: Vivek el 16 de Mayo de 2014

0 votos

for i=1:length(A)
eval(['A',num2str(i),'=A{',num2str(i),'}']);
end
If you are writing a function, then specify the workspace in eval command. You can also use assignin instead of eval

Categorías

Más información sobre Variables en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 16 de Mayo de 2014

Editada:

el 16 de Mayo de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by