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

MATLAB help please Explore the log scale plotting functions semilogx, semilogy a

ID: 3706814 • Letter: M

Question

MATLAB help please

Explore the log scale plotting functions semilogx, semilogy and loglog. Using a log scale plot can reveal large dynamic ranges, which is common in many engineering applications. For example, a frequency-selective amplifier is designed to have its gain amplitude G as a function of frequency f (in Hz), as descrihed in the following equation: 1000 , where R L C are resistor, inductor and capacitor values used in the system Write a MATLAB script file that will plot the gain amplitude v.s. frequency f over the range of 1 to IM Hz (1x06 Hz), for two different systems: For cach of the system, create 4 subplots, the first one using linear x and y axis, the second one using log x axis but near y axis, the third one using linearx axis but log y axis, and the last one using both log x and y axis. Compare the two systems in the same subplot figures. Use appropriate labels, titles and legends for all your plots. Make sure the system component values are presented in the figure

Explanation / Answer

function[]=main()
R=1000;C=10^-6;L=0.1;
plot(R,C,L);

R=10000;C=10^-5;L=0.01;
end


function []=plot(R,C,L)
%Frequency
f=1:10^6;
den=(sqrt(1+(R*(2*pi*f*C-(1/2*pi*f*L))).^2))*10^-3;
G=1/den;

%1st plot
subplot(2,2,1);
figure;
semilogy(f,G);
title('Normal Plot');


%2nd Subplot
subplot(2,2,2);
figure;
semilogx(f,G);
title('Semilogx Plot');

%3rd Subplot
subplot(2,2,3);
figure;
semilogy(f,G);
title('Semilogy Plot');

%4th Subplot
subplot(2,2,4);
figure;
semilogy(f,G);
title('Loglog Plot');

end