set_apodization()
Description: This function is used to apodize transducer arrays by setting the amplitudes of the individual transducers.
Usage
transducer = set_apodization(transducer, apodization, r);
Arguments
- transducer A FOCUS transducer array.
- apodization A vector the same size as the transducer array containing the amplitude to be used for each element in the array, e.g. [0 0.5 1 0.5 0] for a five-element array. This argument can also be a string representing the type of apodization to use. Options are:
- bartlett Bartlett-Hann window — see documentation for the MATLAB bartlett() function for details.
- chebyshev Chebyshev window — see documentation for the MATLAB chebwin() function for details.
- hamming Hamming window — w(n) = 0.54 - 0.46cos(2π n⁄N - 1)
- hann Hann window — w(n) = 0.5(1 - cos(2π n⁄N - 1))
- triangle Triangular window — w(n) = 2n⁄N - 1(N - 1⁄2 - |n - N - 1⁄2|)
- uniform Uniform window — w(n) = 1
- r An optional tuning parameter used only for Chebyshev apodization. r is the desired size of the sidelobes relative to the main lobe in dB. The default value is 100.
Output Parameters
- transducer The transducer struct with the new amplitude values.

