Why won't my sinusoidal code display a plot?
Ältere Kommentare anzeigen
When I run the code, an empty plot displays. How do I make it display my sinusoids?
v = sqrt(2);
f = 2500;
t = 1/f;
time = [0:0.00001:2*t];
w = 2 * pi *f;
Vs = sin(w.*t);
Vc = v./2 *sin(w.*t+45);
Vl = v./2 * sin(2*t-45);
plot(time,Vs)
hold on
plot(time,Vc)
hold on
plot(time,Vl)
hold off
legend('Vs','Vc','Vl')
title('Plot for Question 5')
xlabel('Seconds')
ylabel('Volts')
grid on
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Language Fundamentals finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!