Plotting a high frequency sine
11 ビュー (過去 30 日間)
古いコメントを表示
Hello to all, I am a EE student who tries to learn MATLAB, I had homework about Fourier Series and LTI systems response, and I found the response of the filter as
y = ((-36/(pi^2))*sin(2*pi*10^3*t)) - ((28/(9*pi^2))*sin(2*pi*3*10^3*t))-((4/(5*pi^2))*sin(2*pi*5*10^3*t))-((12/(49*pi^2))*sin(2*pi*7*10^3*t))-((4/(81*pi^2))*sin(2*pi*9*10^3*t))
I need to plot this function, but when I try to do it, it looks like nonsense. Also, I do not know how should I set the interval of the independent variable "t", and I think this might be the problem. But the period of the input signal to the filter is 1mS and the filter's bandwidth is 10kHz.
If you can help I would be very appreciated it. I'm adding my codes below. Thanks in advance.
My Code:
t=-10^-3:10^3;
y = ((-36/(pi^2))*sin(2*pi*10^3*t)) - ((28/(9*pi^2))*sin(2*pi*3*10^3*t))-((4/(5*pi^2))*sin(2*pi*5*10^3*t))-((12/(49*pi^2))*sin(2*pi*7*10^3*t))-((4/(81*pi^2))*sin(2*pi*9*10^3*t))
plot(t,y);
xlabel("t")
ylabel("y(t)")
0 件のコメント
回答 (1 件)
Walter Roberson
2023 年 4 月 1 日
Pi = sym(pi);
syms t real
y = ((-36/(Pi^2))*sin(2*Pi*10^3*t)) - ((28/(9*Pi^2))*sin(2*Pi*3*10^3*t))-((4/(5*Pi^2))*sin(2*Pi*5*10^3*t))-((12/(49*Pi^2))*sin(2*Pi*7*10^3*t))-((4/(81*Pi^2))*sin(2*Pi*9*10^3*t))
If you look at that you can see there is a sine wave of frequency 9000 Hz -- but it has low amplitude so it is difficult to see.
The most you can see is to roughly
fplot(y, [0 0.03])
which is pretty boring.
When you go to 1000 like you do, in 1 Hz increments, you get a lot of aliasing.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Plot Customization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

