MATLAB Answers

0

How can I store a matrix within another matrix?

Asked by Stephen Phillips on 15 Jul 2014
Latest activity Commented on by Joseph Cheng
on 15 Jul 2014
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 Comments

Sign in to comment.

2 Answers

Answer by Joseph Cheng
on 15 Jul 2014
 Accepted Answer

you can turn the matrix into a cell array.

  1 Comment

mat2cell has some good diagrams to show what you can accomplish with cells

Sign in to comment.



You could try something like:
reshape(dat, [3,5,21,3])

  0 Comments

Sign in to comment.