Plotting cos(omega*t)?
15 ビュー (過去 30 日間)
古いコメントを表示
Hi, How do you plot cos(omega*t) where omega=2*pi*f, for range of frequency like (20:2000). I am confused because there is both time and frequency, do we need to convert time to frequency domain?
0 件のコメント
採用された回答
Jos (10584)
2016 年 6 月 20 日
編集済み: Jos (10584)
2016 年 6 月 20 日
This might guide you a little:
t = linspace(0,10,1000) ; % time vector
f = 20 ; % a frequency
omega = 2.*pi.*f ; % calculate omega
y = cos(omega.*t) ; % calculate cosine for this time span
plot(t,y) % plot it
(btw, I prefer to use the .* notation for multiplication)
5 件のコメント
Jos (10584)
2016 年 6 月 20 日
the magnitude does not change with the frequency ... Or do you mean something else?
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!