Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Matlab Help... I need help modifying the script for this problem. What I would l

ID: 3556782 • Letter: M

Question

Matlab Help...

I need help modifying the script for this problem. What I would like to do is include something in the script that will graphically show the range of frequencies for which the ouput amplitude is less than 70% of the input amplitude. The original problem statement and script are shown below.

The circuit shown in Figure P26 consists of a resistor and a capacitor and is thus called an RC circuit. If we apply a sinusoidal voltage vi called the input voltage, to the circuit as shown, then eventually the output voltage v0 will be sinusoidal also, with the same frequency but with a different amplitude and shifted in time relative to the input voltage. Specially, if Vi = Ai; sin omega t, then v0 = A0 sin(omega t + phi). The frequency hyphen response plot is a plot of A0/Ai versus frequency w. It is usually plotted on logarithmic axes. Upper hyphen level engineering courses explain that for the RC circuit shown, this ratio depends on to and RC as follows: where s = omega i. For RC = 0.1 s, obtain the log - log plot of |A0|Ai| versus omega and use it to nd the range of frequencies for which the output amplitude A0 is less than 70 percent of the input amplitude A;.

Explanation / Answer

ANSWER:

%The magnitude of s is the angular frequency vector.

s = [1:100];

s = s.*i;

%A loop to find the gain at every angular frequency

for k=1:1:100

%gain has the values of the gains at different frequencies.

gain(k) = 1/(abs(1+0.1*s(k)));

end

plot([1:100],gain);

%Finding the freq at which the gain is 70%:

%fre is the variable which has the frequency at which the gain is 70%

fre = [(1/0.7)^2 - 1]*100;

fre = sqrt(fre);

%Displaying the range:

disp('Range is :');

disp(fre);

disp('to infinity');