Matlab cell nightmare
Apr. 6th, 2009 02:52 pmIncumbent is a cell-array containing 149 vectors (each one 512-dimensional).
So far so good! Now, let's record that.
and access it:
Still working as expected.
Now, let's try to access a vector again.
What??? incu{1} should refer to a 512-d vector, but 'incu' should be equal to 'incumbent'.
>> size(incumbent)
ans =
1 149 >> size(incumbent{1})
ans =
512 1So far so good! Now, let's record that.
>> rec{1,1} = struct('inc', incumbent); and access it:
>> rec{1,1}
ans =
1x149 struct array with fields:
inc Still working as expected.
Now, let's try to access a vector again.
>> incu = rec{1,1}.inc;
>> size(incu)
ans =
512 1 What??? incu{1} should refer to a 512-d vector, but 'incu' should be equal to 'incumbent'.