p.
>> omega_c = 2*pi*2000;
>> C = 1e-6;
>> R = 1/sqrt (C^2*omega_c^2)
f = linspace ( 0, 20000, 200);
>> B = 1; A = [R*C 1]; Hmag_RC = abs([H] (B, A, f*2*pi));
>> plot(f, abs(f*2*pi) <=omega_c, 'k-', f, Hmag_RC, 'k--');
>> xlabel ('f [Hz]'); ylabel ('|H_{RC} (j2\pi f)|');
>> axis ([0 20000 -0.05 1.05]); legend('Ideal' , 'First-Order RC');
why wont my code work to get the magnitude response of this filter. I even tried calling the function on the separate file. function [H] = MS4P1 (A, B, omega);
thanks!
>> omega_c = 2*pi*2000;
>> C = 1e-6;
>> R = 1/sqrt (C^2*omega_c^2)
f = linspace ( 0, 20000, 200);
>> B = 1; A = [R*C 1]; Hmag_RC = abs([H] (B, A, f*2*pi));
>> plot(f, abs(f*2*pi) <=omega_c, 'k-', f, Hmag_RC, 'k--');
>> xlabel ('f [Hz]'); ylabel ('|H_{RC} (j2\pi f)|');
>> axis ([0 20000 -0.05 1.05]); legend('Ideal' , 'First-Order RC');
why wont my code work to get the magnitude response of this filter. I even tried calling the function on the separate file. function [H] = MS4P1 (A, B, omega);
thanks!