In a low-pass RC filter (a filter that passes signals with low frequencies), the
ID: 3621128 • Letter: I
Question
In a low-pass RC filter (a filter that passes signals with low frequencies), the ratio of the magnitude of the voltages is given by:
RV = abs(Vo/Vi) = 1/(sqrt(1+(RC)^2))
where w is the frequency of the input signal. Write a user-defined MATLAB function that calculated the magnitude ratio. For the function name and arguments use RV = lowpass(R,C,w). The input arguments are: R the size of the resistor in Ohms, C the size of the capacitor in Farads, and w the frequency of the input signal in rad/sec. Write the function such that w can be a vector. (Problem #1 with me).
Write a program in a script file that uses the lowpass function to generate a plot of RV as a function of w for 10^-2 10^6 rad/sec. The plot has a logarithmic scale on the horizontal axis (w). When the script file is executed, it asks the user to enter the values of R and C. Label the axes of the plot. (no need, I know how to do that part :)). Run the script file with R = 1200 ohms, and C = 8 microF.
So far, I only have the basics down, but what I am most confused on is how "to make w be a vector"..
Explanation / Answer
Given data: R=1200; C=8*10^-6; w=10^-2:10:10^6; >>R=1200; >>C=8*10^-6; >>w=10^-2:10:10^6; function [Rv]=Magnitude(R,C,w) Rv=1./(sqrt(1+power((w*R*C),2))); plot(w,Rv); end If you want any clarification, post in Electrical Engineering
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.