Signal Processing Functions

Parent Previous Next

VisualSim                                                                                                                                    

Signal Processing Functions

 

Function, Argument Type(s) & Return Type

 

Description

 

Convolve

{double}, {double} / {complex}, {complex}

Return Type: {double} / {complex}

Convolve two arrays and return an array whose length is sum of the lengths of the two arguments minus one. Convolution of two arrays is the same as polynomial multiplication.

DCT

{double} / {double}, int / {double}, int, int

Return Type: {double}

Return the discrete cosine transform of the specified array, using the specified (optional) length and normalization strategy.

downsample

{double}, int / {double}, int, int

Return Type: {double}

Return a new array with every    -th element of the argument array, where is the second argument. If a third argument is given, then it must be between 0 and, and it specifies an offset into the array (by giving the index of the first output).

FFT

{double} / {complex} / {double}, int {complex}, int

Return Type: {complex}

Return the fast Fourier transform of the specified array. If the second argument is given with value, then the length of the transform is. Otherwise, the length is the next power of two greater than or equal to the length of the input array. If the input length does not match this length, then input is padded with zeros.

generateBartlettWindow

int

Return Type: {double}         

Return a Bartlett (rectangular) window with the specified length. The end points have value 0.0, and if the length is odd, the center point has value 1.0. For length M + 1, the formula is:

generateBlackmanWindow

int

Return Type: {double}

Return a Blackman window with the specified length. For length M + 1, the formula is:

generateBlackmanHarrisWindow

int

Return Type: {double}

Return a Blackman-Harris window with the specified length. For length M + 1, the formula is:

generateGaussianCurve

double, double, int

Return Type: {double}

Return a Gaussian curve with the specified standard deviation, extent, and length. The extent is a multiple of the standard deviation. For instance, to get 100 samples of a Gaussian curve with standard deviation 1.0 out to four standard deviations, use generateGaussianCurve(1.0, 4.0, 100).

generateHammingWindow

int

Return Type: {double}

Return a Hamming window with the specified length. For length M + 1, the formula is:

generateHanningWindow

int

Return Type: {double}

Return a Hanning window with the specified length. For length M + 1, the formula is:

generatePolynomialCurve

{double}, double, double, int

Return Type: {double}

Return samples of a curve specified by a polynomial. The first argument is an array with the polynomial coefficients, beginning with the constant term, the linear term, the squared term, etc. The second argument is the value of the polynomial variable at which to begin, and the third argument is the increment on this variable for each successive sample. The final argument is the length of the returned array.

generateRaisedCosinepulse

double, double, int

Return Type: {double}

Return an array containing a symmetric raised-cosine pulse. This pulse is widely used in communication systems, and is called a "raised cosine pulse" because the magnitude its Fourier transform has a shape that ranges from rectangular (if the excess bandwidth is zero) to a cosine curved that has been raised to be non-negative (for excess bandwidth of 1.0). The elements of the returned array are samples of the function:

where x is the excess bandwidth (the first argument) and T is the number of samples from the center of the pulse to the first zero crossing (the second argument). The samples are taken with a sampling interval of 1.0, and the returned array is symmetric and has a length equal to the third argument. With an excessBandwidth of 0.0, this pulse is a sinc pulse.

generaterectangularwindow

int

Return Type: {double}

Return an array filled with 1.0 of the specified length. This is a rectangular window.

IDCT

{double} / {double}, int / {double}, int, int

Return Type: {double}

Return the inverse discrete cosine transform of the specified array, using the specified (optional) length and normalization strategy.

IFFT

{double} / {complex} / {double}, int {complex}, int

Return Type: {complex}

Return the inverse fast Fourier transform of the specified array. If the second argument is given with value, then the length of the transform is. Otherwise, the length is the next power of two greater than or equal to the length of the input array. If the input length does not match this length, then input is padded with zeros.

nextPowerOfTwo

double

Return Type: int

Return the next power of two larger than or equal to the argument.

poleZeroToFrequency

{complex}, {complex}, complex, int

Return Type: {complex}

Given an array of pole locations, an array of zero locations, a gain term, and a size, return an array of the specified size representing the frequency response specified by these poles, zeros, and gain. This is calculated by walking around the unit circle and forming the product of the distances to the zeros, dividing by the product of the distances to the poles, and multiplying by the gain.

sinc

double

Return Type: double

Return the sinc function, where special care is taken to ensure that 1.0 is returned if the argument is 0.0.

toDecibels

double

Return Type: double

Return where is the argument.

unwrap

{double}

Return Type: {double}

Modify the specified array to unwrap the angles. That is, if the difference between successive values is greater than in magnitude, then the second value is modified by multiples of until the difference is less than or equal to. In addition, the first element is modified so that its difference from zero is less than or equal to in magnitude.

upsample

{double}, int

Return Type: {double}

Return a new array that is the result of inserting zeroes between each successive sample in the input array, where is the second argument. The returned array has length, where L is the length of the argument array. It is required that.

 

 

 

Created with the Personal Edition of HelpNDoc: Free HTML Help documentation generator