Plot a sine wave with the following... how to plot it?
2 ビュー (過去 30 日間)
古いコメントを表示
Create a time vector, sine wave, 5 periods, 1 kHz, amplitude 2 volts in 5 x 1024 samples (time axis) as well as 5 periods in 4096 samples
採用された回答
Rik
2017 年 6 月 7 日
You're very close:
freq=1000;%1 kHz
t=linspace(0,5,1024)/freq;%from 0 to 5 periods in 1024 steps
A=2;%amplitude
x=A*sin(freq*t*2*pi);
plot(t,x)
I don't really see how more samples will change things, but you can just change the linspace parameters.
0 件のコメント
その他の回答 (1 件)
SWETA K
2021 年 2 月 19 日
x=0:3.14/100:2*3.14;
y=sin(x);
plot(x,y);
title('A Plot of Sine Curve');xlabel ('x-axis');
ylabel ('y-axis');
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Linear Prediction についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!