A circuit filters out a certain frequency is shown in the figure. In this filter
ID: 2082436 • Letter: A
Question
A circuit filters out a certain frequency is shown in the figure. In this filter, the ratio of the magnitudes of the voltage is gives by: RV = |V_o/V_i| = |R(1 - omega^2 LC)|/squareroot (R - R omega^2 LC^2) + (omega^2 L)^2 where omega is the frequency of the input signal. Write a user-defined MATLB function that calculates the magnitude ratio. For the function name and arguments use RV = (R, C, L, w). The arguments are as follows: R the size of the resistor in Ohm (ohms): C, the size of the capacitor in F (farads); L, the inductance of the coil in H (henrys) and w, the frequency of the input signal in rad/s. The function should be written to accept vector arguments for w. Refer to the graphical user interface shown in Figure 1. Select between 2 Analysis Types Using The "Analysis Type" Popup Menu The two analysis types are Frequency Analysis and statistical Analysis. The operation for the two analysis types are The edit boxes beside the slider show the current value of the corresponding variable Use the same specified range for w and horizontal axis as specified in part A, Both plots should appear simultaneously on the same axis. When the Statistical Analysis is selected and the DisplayExplanation / Answer
Solution - Problem 1
Copy the following code to a new function file in MATLAB. Name the file ex3Func.m
function [RV] = ex3Func(R,C,L,w)
num = abs(R*(1-((w.^2)*L*C)));
den = abs(sqrt((R-(R*(w.^2)*L*C)).^2 + ((w.^2)*L).^2));
RV = num ./ den;
end
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.