I hope to use enough points and show only a few repetitions to make a smooth graph.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Changhyun Kim
am 30 Mär. 2022
Kommentiert: Voss
am 30 Mär. 2022
Plot the sinusoid 2*cos(2*pi*1500*t+pi/2), starting at t=0 seconds.
I want to use enough points and show only a few repetitions to make a smooth graph.
.
.
thanks for ur kindness
0 Kommentare
Akzeptierte Antwort
Voss
am 30 Mär. 2022
% cos(t) has period 2*pi
% cos(2*pi*t) has period 1
% cos(2*pi*1500*t) has period 1/1500
%
% pick t values that span a few periods
% (i.e., a few multiples of 1/1500):
%
% 500 points, starting with 0, ending with 5/1500:
t = linspace(0,5/1500,500);
x = 2*cos(2*pi*1500*t+pi/2);
plot(t,x);
xlabel('t');
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices 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!
