From: Rachit on
I have a small problem in defining a Matrix

How should I define a Matrix of 530X1 with all columns as 2 ??

Also later I need to concatanate this matrix to a 530X 3 matrix so that it becomes 530X4 matrix.

Can anyone help me this.I know it's simple but getting stuck somewhere in the definiton.

Thanks in advance.

Rac..
From: us on
"Rachit " <racpsine(a)gmail.com> wrote in message <hvomkp$ha7$1(a)fred.mathworks.com>...
> I have a small problem in defining a Matrix
>
> How should I define a Matrix of 530X1 with all columns as 2 ??
>
> Also later I need to concatanate this matrix to a 530X 3 matrix so that it becomes 530X4 matrix.
>
> Can anyone help me this.I know it's simple but getting stuck somewhere in the definiton.
>
> Thanks in advance.
>
> Rac..

one of the many solutions

% assume M2 is your 530x3 mat
m2=rand(530,3);
m1=2*ones(530,1);
ma=[m1,m2];
% spare CSSM the readout of MA...

us