set_medium()
Description: Create a medium struct for use with other FOCUS functions.
Usage
medium = set_medium(cb, wb, rho, c_sound, b, atten_coeff, ct, kappa, beta);
medium = set_medium('lossless');
medium = set_medium('specificheatofblood',cb,'bloodperfusion',wb,'density',rho, 'soundspeed',c_sound,\
powerlawexponent',b,'attenuationdBcmMHz',atten_coeff, 'specificheat',ct,'thermalconductivity',kappa,'nonlinearityparameter',beta);
Arguments
- cb Specific heat of blood in J/kg/K
- wb Blood perfusion in kg/meter3/s
- rho The density of the medium in kg/meter3
- c_sound The speed of sound in m/s
- b Power law coefficient; unitless.
- atten_coeff Attenuation coefficient in dB/cm/MHz
- ct Specific heat of the medium in J/kg/K
- kappa Thermal conductivity in W/m/K
- beta Nonlinear parameter; unitless
Output Parameters
- medium A MATLAB struct with the following properties:
- bloodperfusion
- density
- soundspeed
- powerlawexponent
- attenuationdBcmMHz
- specificheat
- thermalconductivity
- nonlinearityparameter
Notes
Calling set_medium with a string argument will create one of the default media created by define_media. The options for these strings are: lossless, attenuated, water, skin, fat, muscle, liver.
When the arguments are preceded by their names (e.g. set_medium('density',1500);), they can be in any order and any number of them can be missing. Calling set_medium with no arguments would be equivalent to calling set_medium('lossless');.
Calling this function with no arguments will cause the program to prompt the user for each required value.

