Analyze a Signal using Matlab

조회 수: 1 (최근 30일)
collegestudent
collegestudent 2023년 1월 27일
댓글: Rena Berman 2023년 2월 8일
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
  1. the time between sampled points
  2. fundamental frequency of signal
  3. fundamental angular frequency of signal
  4. max value of t in plot
  5. 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
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
  1. the time between sampled points
  2. fundamental frequency of signal
  3. fundamental angular frequency of signal
  4. max value of t in plot
  5. 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
Rena Berman 2023년 2월 8일
(Answers Dev) Restored edit

댓글을 달려면 로그인하십시오.

답변 (1개)

Nikhilesh
Nikhilesh 2023년 1월 27일
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.
  1. 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.
  2. 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.

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by