Scicos function duplicate - duplicates vector entries
Calling Sequence
- v=duplicate(u,count)
Parameters
- u
: a vector of real numbers of size n
- count
: vector of real numbers (usually positive integers) of size n
- v
: vector of real numbers
Description
v=duplicate(u,count) returns the column vector:
v=[u(1)*ones(count(1),1);
u(2)*ones(count(2),1);
...
u(n)*ones(count(n),1)]
Examples
v=duplicate([1,%pi,-%e],[2 0 3])
See Also
Author