Generate a Gaussian modulated sinusoidal pulse sampled at times
Vector of time values at which the unit-amplitude Gaussian RF pulse is calculated.
Center frequency of the Gaussian-modulated sinusoidal pulses, specified as a real positive scalar expressed in Hz. Default: 1000
Fractional bandwidth of the Gaussian-modulated sinusoidal pulses, specified as a real positive scalar.
yi = gauspuls(t,fc,bw) returns a unit-amplitude Gaussian-modulated sinusoidal RF pulse at the times indicated in array t,
with a center frequency fc in hertz and a fractional bandwidth bw
Inphase Gaussian-modulated sinusoidal pulse, returned as a vector of unit amplitude at the times indicated by the time vector t.
gauspuls function differs from the function in the Matlab signal package. The Octave function
does not use the
bwr (fractional bandwidth reference level), the
tpe (trailing pulse envelope level), and
'cutoff' input arguments. In addition, it only returns the inphase Gaussian pulse, not the quadrature pulse nor
the signal envelope and cutoff time.
Original Matlab/Octave code Copyright (C) 2007 Sylvain Pelissier, Copyright (C) 2018-2019 Mike Miller. Port to R by Geert van Boxtel [email protected].
1 2 3 4 5 6 7 8 9 10 11 12 13
fs <- 11025 # arbitrary sample rate t <- seq(-10, 10, 1/fs) yi1 <- gauspuls(t, 0.1, 1) yi2 <- gauspuls(t, 0.1, 2) plot(t, yi1, type="l", xlab = "Time", ylab = "Amplitude") lines(t, yi2, col = "red") fs <- 11025 # arbitrary sample rate f0 <- 100 # pulse train sample rate x <- pulstran (seq(0, 4/f0, 1/fs), seq(0, 4/f0, 1/f0), "gauspuls") plot (0:(length(x)-1) * 1000/fs, x, type="l", xlab = "Time (ms)", ylab = "Amplitude", main = "Gaussian pulse train at 10 ms intervals")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.