From: Jal on
Hi all,
I have a 3x1 column vector and I want to build a column vector of size (n).
Example:-
Assume
a=[1+j*0 ; -0.5000 -j*0.8660 ; -0.5000 + j*0.8660]

How can I build a column vector say (b) of size (n=12) form vector (a)?
vector b should look like:
b=[1+j*0
-0.5000 -j*0.8660
-0.5000 + j*0.8660
1+j*0
-0.5000 -j*0.8660
-0.5000 + j*0.8660
1+j*0
-0.5000 -j*0.8660
-0.5000 + j*0.8660
1+j*0
-0.5000 -j*0.8660
-0.5000 + j*0.8660];
From: Matt Fig on
See the help for the REPMAT function.
From: Roger Stafford on
"Jal" <jal(a)mathworks.com> wrote in message <htbten$51q$1(a)fred.mathworks.com>...
> Hi all,
> I have a 3x1 column vector and I want to build a column vector of size (n).
> Example:-
> Assume
> a=[1+j*0 ; -0.5000 -j*0.8660 ; -0.5000 + j*0.8660]
>
> How can I build a column vector say (b) of size (n=12) form vector (a)?
> vector b should look like:
> b=[1+j*0
> -0.5000 -j*0.8660
> -0.5000 + j*0.8660
> 1+j*0
> -0.5000 -j*0.8660
> -0.5000 + j*0.8660
> 1+j*0
> -0.5000 -j*0.8660
> -0.5000 + j*0.8660
> 1+j*0
> -0.5000 -j*0.8660
> -0.5000 + j*0.8660];

You need matlab's 'repmat'. Check it out.

Roger Stafford