i need to plot a sine wave of 1khz using sampling frequency. where am i going wrong? i need a correct representation of wave.

29 次查看(过去 30 天)
fs=10000;%sampling frequency
ts=1/fs;
t=0:ts:1-ts;
f1=10;
a=sin(2*pi*f1*t);
plot(t,a);
  4 个评论
Walter Roberson
Walter Roberson 2021-3-9
fs=10000;%sampling frequency
ts=1/fs;
t=0:ts:1-ts;
f1=10;
a=sin(2*pi*f1*t);
plot(t,a);
That looks appropriate time to me. Your upper bound on your t is just before 1 (second) and you draw to 1 (second)

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by