Scilab Wavelet Toolbox Function
Last update : Feburary 2006

down2 - down sampling by factor of 2

Calling Sequence

b=down2(a)

Parameters

Description

This function down samples the input vector by factor of 2. The output length would be half length of the input vector. Odd-indexed element would be abandoned and even-indexed element would be retained. If the length of the input vector 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=down2(a)
 ans =

2 4

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

2 4

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

-->a=1;
-->b=down2(a)
Input should be vectors!

  

See Also

up2