How can I store a matrix within another matrix?

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?

 Réponse acceptée

Joseph Cheng
Joseph Cheng le 15 Juil 2014

0 votes

you can turn the matrix into a cell array.

1 commentaire

Joseph Cheng
Joseph Cheng le 15 Juil 2014
mat2cell has some good diagrams to show what you can accomplish with cells

Connectez-vous pour commenter.

Plus de réponses (2)

Rizwan Khan
Rizwan Khan le 6 Sep 2020

1 vote

%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);
.....................................................

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by