set_excitation_function()
Description: A function to create an excitation function suitable for use with transient_pressure and other transient pressure calculation functions.
Usage
fn = set_excitation_function(type, f0, w);
fn = set_excitation_function(type, f0, w, b);
fn = set_excitation_function(signal, sample_period, clipping_threshold);
Arguments
- type A string representing the function type. Three are available:
- "tone burst" tone burst (A0sin(2π f0 t))
- "hann pulse" Hann-weighted pulse (A0(1 - cos(2πt⁄w))sin(2π f0 t))
- "tcubed pulse" broadband t3 pulse (A0 t3 e - B tsin(2π f0 t))
- f0 Center frequency in Hz
- w width of the pulse in s
- b Exponential term in the t-cubed pulse.
- signal A MATLAB vector containing a set of time samples representing the excitation signal in m/s.
- sample_period The duration between points in the excitation signal in s.
- clipping_threshold Optional argument describing the threshold below which frequency components will be ignored. If this value is negative, it will be assumed to be in dB, otherwise any value between zero and one can be used.
Output Parameters
- fn A MATLAB structure containing the values specified by the user.
Notes
Transient calculations can be performed with arbitrary input signals, however performance will be improved if one of the signal types for which an analytical TSD expression has been derived is used. Otherwise, the calculation will be performed using FDTSD. See the documentation for fnm_tsd for details.
Calling this function with no arguments will cause the program to prompt the user for each required value.
The amplitude of the excitation can be set on each transducer by changing its amplitude property.
Excitation function types can also be described using their integer identifiers; 1 for tone burst, 2 for Hann-weighted pulse, and 3 for t-cubed pulse.

