From: George on
Hi guys,

I have a question dealing with arrays. Here it go:

Suppose A is a 3 by 1 array, I want to assign A (1,1) a 5 by 1 array B, can I do this? How?

Thanks in advance!
From: Wayne King on
"George " <guanjihou(a)gmail.com> wrote in message <hutpgd$km$1(a)fred.mathworks.com>...
> Hi guys,
>
> I have a question dealing with arrays. Here it go:
>
> Suppose A is a 3 by 1 array, I want to assign A (1,1) a 5 by 1 array B, can I do this? How?
>
> Thanks in advance!

Hi George, make A a cell array

A = cell(3,1);
B = randn(5,1);
A{1} = B;

Wayne
From: Matt Fig on
% Use a cell array.
A = cell(3,1);
A{1} = rand(5,1);

% Now look
A{1}
From: George on

>
> Hi George, make A a cell array
>
> A = cell(3,1);
> B = randn(5,1);
> A{1} = B;
>
> Wayne

Thanks Wayne, it really helps.
From: George on
"Matt Fig" <spamanon(a)yahoo.com> wrote in message <hutqch$rai$1(a)fred.mathworks.com>...
> % Use a cell array.
> A = cell(3,1);
> A{1} = rand(5,1);
>
> % Now look
> A{1}

Thanks Matt.