How can I store a matrix within another matrix?
47 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Joseph Cheng
2014 年 7 月 15 日
you can turn the matrix into a cell array.
1 件のコメント
Joseph Cheng
2014 年 7 月 15 日
mat2cell has some good diagrams to show what you can accomplish with cells
その他の回答 (2 件)
Rizwan Khan
2020 年 9 月 6 日
%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 件のコメント
Guilherme Coco Beltramini
2014 年 7 月 15 日
You could try something like:
reshape(dat, [3,5,21,3])
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!