user7690911
user7690911

Reputation:

Cell matrix (changing size in matlab)

How can a matrix as A

       [1x11 double]    [1x11 double]    [1x6 double]
A =    [1x14 double]    [1x10 double]    [1x8 double]

be cnverted to a matrix ,say B,

B =    [1x25 double]    [1x21 double]    [1x14 double]

[] blocks in B matrix contains elements in rows of matrix A. Any answers is highly apreciated.

Upvotes: 1

Views: 49

Answers (1)

Phil Goddard
Phil Goddard

Reputation: 10762

One of many possible solutions,

B = cell(1,size(A,2));
for i = 1:numel(B)
   B{i} = [A{:,i}];
end

Upvotes: 1

Related Questions