Signal Processing Toolbox
  Go to function:
    Search    Help Desk 
pulstran    Examples   See Also

Pulse train generator.

Syntax

Description

pulstran generates pulse trains from continuous functions or sampled prototype pulses.

y = pulstran(t,d,'func') generates a pulse train based on samples of a continuous function, 'func', where func is

pulstran is evaluated length(d) times and returns the sum of the evaluations y = func(t-d(1)) + func(t-d(2)) + ...

The function is evaluated over the range of argument values specified in array t, after removing a scalar argument offset taken from the vector d. Note that func must be a vectorized function that can take an array t as an argument.

An optional gain factor may be applied to each delayed evaluation by specifying d as a two-column matrix, with the offset defined in column 1 and associated gain in column 2 of d. Note that a row vector will be interpreted as specifying delays only.

pulstran(t,d,'func',p1,p2,...) allows additional parameters to be passed to 'func' as necessary. For example,

pulstran(t,d,p,Fs) generates a pulse train that is the sum of multiple delayed interpolations of the prototype pulse in vector p, sampled at the rate Fs, where p spans the time interval [0, (length(p)-1)/Fs], and its samples are identically 0 outside this interval. By default, linear interpolation is used for generating delays.

pulstran(t,d,p) assumes that the sampling rate Fs is equal to 1 Hz.

pulstran(...,'func') specifies alternative interpolation methods. See interp1 for a list of available methods.

Examples

This example generates an asymmetric sawtooth waveform with a repetition frequency of 3 Hz and a sawtooth width of 0.1 sec. It has a signal length of 1 sec and a 1 kHz sample rate:

This example generates a periodic Gaussian pulse signal at 10 kHz, with 50% bandwidth. The pulse repetition frequency is 1 kHz, sample rate is 50 kHz, and pulse train length is 10 msec. The repetition amplitude should attenuate by 0.8 each time:

This example generates a train of 10 Hamming windows:

See Also

chirp
Swept-frequency cosine generator.
cos
Cosine of vector/matrix elements (see the online MATLAB Function Reference).
diric
Dirichlet or periodic sinc function.
gauspuls
Gaussian-modulated sinusoidal pulse generator.
rectpuls
Sampled aperiodic rectangle generator.
sawtooth
Sawtooth or triangle wave generator.
sin
Sine of vector/matrix elements (see the online MATLAB Function Reference).
sinc
Sinc or sin(t)/t function.
square
Square wave generator.
tripuls
Sampled aperiodic triangle generator.


[ Previous | Help Desk | Next ]