how do i plot the output vo against frequency ? i tried out however my graph seems weird thank you in advance
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Av=1+(Rf/Ri_minus);
Vo= (1+(Rf/Ri_minus))*Vin;
Vonew=subs(Vo,{Rf,Ri_minus,Vin},{10,20,30})
f = 50 %Hz
% x = linspace(0, 2*pi, 1000);
y = Vonew* sin((2 * pi * f/1000*(0:19))); %sample time sie of 1000,20x [0:19] 1 time period
plot( y, 'b-', 'LineWidth', 2);
xlabel('time', 'FontSize', 20);
ylabel('vo', 'FontSize', 20);
title('vo vs time', 'FontSize', 20);
this is my codes however the graph seems a little weird
thank you inadvance
0 Kommentare
Antworten (1)
VBBV
am 14 Feb. 2022
Bearbeitet: VBBV
am 14 Feb. 2022
% Rf = 1.1;
% Ri_minus = 0.2;
% Vin = 10;
syms Rf Ri_minus Vin
Av=1+(Rf/Ri_minus);
Vo= (1+(Rf/Ri_minus))*Vin;
Vonew=subs(Vo,[Rf,Ri_minus,Vin],[10,20,30])
f = 50; %Hz
% x = linspace(0, 2*pi, 1000);
y = Vonew* sin((2 * pi * f/1000*(0:19))); %sample time sie of 1000,20x [0:19] 1 time period
plot(y, 'b-', 'LineWidth', 2);
xlabel('time', 'FontSize', 20);
ylabel('vo', 'FontSize', 20);
title('vo vs time', 'FontSize', 20);
f = linspace(20,100,length(0:19)); %Hz
% x = linspace(0, 2*pi, 1000);
y = Vonew* sin((2 * pi * f./1000.*(0:19))); %sample time sie of 1000,20x [0:19] 1 time period
figure(2)
plot(f,y, 'b-', 'LineWidth', 2);
xlabel('frequency', 'FontSize', 20);
ylabel('vo', 'FontSize', 20);
title('vo vs frequency ', 'FontSize', 20);
0 Kommentare
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

