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?

 채택된 답변

Joseph Cheng
Joseph Cheng 2014년 7월 15일

0 개 추천

you can turn the matrix into a cell array.

댓글 수: 1

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

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Rizwan Khan
Rizwan Khan 2020년 9월 6일

1 개 추천

%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);
.....................................................
Guilherme Coco Beltramini
Guilherme Coco Beltramini 2014년 7월 15일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 Tables에 대해 자세히 알아보기

질문:

2014년 7월 15일

답변:

2020년 9월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by