How can I store a matrix within another matrix?
43 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Stephen Phillips
el 15 de Jul. de 2014
Respondida: Rizwan Khan
el 6 de Sept. de 2020
I have a set of data that is 315x3 Double that I need to store as 1x3 double in an array of size 3x5x21. I need it in this form so I can manipulate it in simulink using a lookup table.
What would be a way to do this?
0 comentarios
Respuesta aceptada
Joseph Cheng
el 15 de Jul. de 2014
you can turn the matrix into a cell array.
1 comentario
Joseph Cheng
el 15 de Jul. de 2014
mat2cell has some good diagrams to show what you can accomplish with cells
Más respuestas (2)
Rizwan Khan
el 6 de Sept. de 2020
%create a cell array
c = cell(1,3); % cell array can contain anything
c{1} = data(3,5,21);
c{2} = data(3,5,21);
c{3} = data(3,5,21);
.....................................................
0 comentarios
Guilherme Coco Beltramini
el 15 de Jul. de 2014
You could try something like:
reshape(dat, [3,5,21,3])
0 comentarios
Ver también
Categorías
Más información sobre Cell Arrays en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!