I hope to use enough points and show only a few repetitions to make a smooth graph.
1 view (last 30 days)
Show older comments
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 Comments
Accepted Answer
Voss
on 30 Mar 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');
More Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!