HyperMath

UpSample

UpSample

Previous topic Next topic No expanding text in this topic  

UpSample

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Increases the sampling rate by inserting zeros in between samples.

Syntax

OutputData = UpSample(InputData, Factor, Offset)

Arguments

Name

Description

 

InputData

Vector of data (real) to be down sampled.

 

Factor

Positive integer specifying the up-sampling factor.  The new sampling rate will be a multiple of this.

 

Offset

(Optional)

The amount by which the upsample is offset.  Must be an integer in the range 0 and Zeros – 1.

Output

Name

Description

 

OutputData

A vector of up-sampled data.

Example 1

Up sample a set of data by a factor of 2:

 

Syntax

 

Sampled = UpSample([1 2 3],2)

 

Result

 

Sampled = 1 0  2  0  3  0

Example 2

Repeat the above with an offset of one:

 

Syntax

 

Sampled = UpSample([1 2 3],2,1)

 

Result

 

Sampled = 0  1  0  2  0  3

See Also:

DownSample