Scilab Wavelet Toolbox Function
Last update : Feburary 2006

up2 - up sampling by factor of 2

Calling Sequence

b=up2(a)

Parameters

Description

This function up samples the input vector by factor of 2. The output length would be twice the input vector. Odd-indexed element would be zeros and even-indexed element would be the input value. And the input could be row vectors or column vectors. The output vector would be row vectors.

Examples

-->a=[1 2 3 4 5];
-->b=up2(a)
 ans =

0 1 0 2 0 3 0 4 0 5

-->a=a';
-->b=up2(a)
 ans =

0 1 0 2 0 3 0 4 0 5

-->a=[1 2 3;4 5 6];
-->b=up2(a)
Input should be vectors rather than matrixes!

-->a=1;
-->b=up2(a)
 ans =

0 1

  

See Also

down2