Amplitude Spectrum of a function
2 次查看(过去 30 天)
显示 更早的评论
Hi,
My question is related to plotting amplitude spectrum.
Problem 1: (I have solved it) I have to represent the following function as a discrete set of N=100 numbers separated by time increment of 1/N:
e(t) = 3sin2.1t + 2sin1.9t
I did it using stem function and plotted it.
Problem 2: (I have question about it) The next thing was to repeat the same above all, using dataset of 200 points with time increment of 1/N and 1/2N.
My question is a bit basic but I just want to clear if I am following the right path to solve my problem.
I want to ask that for problem 2, for both 1/N and 1/2N, should I use N=200 (as I believe it is separate problem)?
A few of my mates has suggsted to use N=100 for 1/N and N=200 for 1/2N.
which one is right thing?
Any help will be highly appreciated. Thanks
1 个评论
dpb
2022-9-18
We can't answer that as posed; it is totally dependent upon how the question itself was written; a paraphrase of what it says isn't the same thing...it may well have been ambiguous as written; would seem the logical thing to do would to get the instructor to clarify (or just solve the problem with both interpretations and explain why).
回答(1 个)
Chunru
2022-9-19
If you are studying the effect of sampling frequency, you may want to fix the signal duration, for example
.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1128825/image.png)
In this case, you have:
- fs = N; t = 0:1/fs:1; which equivelant to t=0:1/N:1, (whether N=100 or 200)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!