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?
采纳的回答
更多回答(2 个)
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
2014-7-15
You could try something like:
reshape(dat, [3,5,21,3])
类别
在 帮助中心 和 File Exchange 中查找有关 Tables 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!