Analyze a Signal using Matlab
古いコメントを表示
I have a code that plots a signal and i want to know if there are ways to analyze features of the signal.
I am looking to find
- the time between sampled points
- fundamental frequency of signal
- fundamental angular frequency of signal
- max value of t in plot
- number of cycles plotted
This is my code
fs = 400;
N = 800;
f = 4;
t = (1:N)/fs;
x = sin(2*pi*f*t);
plot(t,x,'k','LineWidth',2);
xlabel('Time'); ylabel('x(t)');
2 件のコメント
John D'Errico
2023 年 1 月 27 日
編集済み: John D'Errico
2023 年 1 月 27 日
When you remove your question after getting an answer, you insult the person who spent the time to answer you. You hurt Answers, because now the answer is useless to anyone else.
And this is a big reason whi I am forced to close so many homework assignment questions when they are posted. Restored from Google cache:
I have a code that plots a signal and i want to know if there are ways to analyze features of the signal.
I am looking to find
- the time between sampled points
- fundamental frequency of signal
- fundamental angular frequency of signal
- max value of t in plot
- number of cycles plotted
This is my code
fs = 400;
N = 800;
f = 4;
t = (1:N)/fs;
x = sin(2*pi*f*t);
plot(t,x,'k','LineWidth',2);
xlabel('Time'); ylabel('x(t)');
Rena Berman
2023 年 2 月 8 日
(Answers Dev) Restored edit
回答 (1 件)
Nikhilesh
2023 年 1 月 27 日
0 投票
Seems this is a theoretical question of signals and not pertaining use of MATLAB. I am answering two of the five and rest you should be able to do it on your own.
- The time between sampled points can be calculated by taking the reciprocal of the sampling frequency (fs), which in this case is 1/400 seconds.
- The fundamental frequency of the signal can be found by dividing 1 by the period of the signal. In this case, the signal is a sine wave with a frequency of 4 Hz, so the fundamental frequency is also 4 Hz.
カテゴリ
ヘルプ センター および File Exchange で Spectral Measurements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!