Data structure in Matlab

1 次查看(过去 30 天)
Torsionfree
Torsionfree 2013-11-6
Can I put a matrix in a vector?!
For example, can I have following structures?
for i = 1:10 X(i) = nan(100,200); end
Of course, I can do by creating 100,2000 matrix and put data consecutively. However, I want to organize them with more convenient indexing.

回答(2 个)

Muneef
Muneef 2013-11-6
yes it can be done you can put a matrix inside a vector by using cells .

Andrei Bobrov
Andrei Bobrov 2013-11-6
X - cell array:
X = repmat({nan(100,200)},10,1);

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by