Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [numCoeffs, denCoeffs] = racquetIIR_impInvar()
- %% Define pertinent terms
- % Plotting vector
- t = -5:0.1:5;
- % Speed of sound, m/s
- c = 343;
- % Volume of a racquetball court in m
- l = 12.1212; w = 6.0606; h = w;
- V = l*w*h;
- % Incident amplitude, determined by the acoustic reflective properties of
- % the room's construction materials
- alphaS_lw = l*w*0.00000148;
- alphaS_wh = w*h*0.0000158;
- alphaS_lh = l*h*0.0000138;
- A = 2*(alphaS_lw + alphaS_wh + alphaS_lh);
- %% Construct equation expressing acoustic decay
- % Usually expressed as a ratio, I/I_0
- p = -(A*c)/(4*V);
- I = exp(p*t);
- s = -5:0.01:5;
- %% Find s-domain model of this decay
- laplaceTrans = 1./(s-p);
- %% Transform to digital filter using impulse invariant transform
- Ts = 0.01;
- % Definition of the imp. invar. transform.
- % Return num and denom of the new transfer function after multiplying top
- % and bottom by z
- numCoeffs = [1 0];
- denCoeffs = [1, -exp(p*Ts)];
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement