Create a non-rectangular array
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Michael
el 21 de Feb. de 2014
Comentada: Sunetra CV
el 13 de Nov. de 2019
Hi
I have several vectors of different lengths and I'd like to save these in one common variable. Let's say, one vector per row, but with different number of cols per row. Is there a way to do so or do I have to store them in a rectangular matrix and just fill up the rows by zeros?
Best regards Michael
0 comentarios
Respuesta aceptada
Mischa Kim
el 21 de Feb. de 2014
Editada: Mischa Kim
el 21 de Feb. de 2014
Michael, have a look at cell arrays:
c = {[1];
[2, 3, 4];
[5, 9];
[6, 7, 8, 10, 11, 12]};
c{2}
ans =
2 3 4
2 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!