Assign a vector to a cell element

Hello there!
I would like to assign a vector to a specific element of a cell array.
Say I have a vector v=(1 0 1)
My cell array is c, c={2,2, []} and I want it to be c={2,2,[1,0,1]}
Thanks in advance for your time!

 Respuesta aceptada

James Tursa
James Tursa el 23 de Jun. de 2016
c{3} = v;

1 comentario

Kike
Kike el 23 de Jun. de 2016
thanks, that was easy, I was trying with num2cell and mat2cell! :S

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Productos

Etiquetas

Preguntada:

el 23 de Jun. de 2016

Comentada:

el 23 de Jun. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by