amplitude of non-periodic signal

조회 수: 2 (최근 30일)
mustafa alnasser
mustafa alnasser 2015년 10월 2일
댓글: Star Strider 2015년 10월 3일
Dear All; if I have a non periodic signal/wave , how can i calculate the amplitude and wavelength ?

채택된 답변

Star Strider
Star Strider 2015년 10월 3일
Another possibility is in the code I used in this Answer. The peak times (the periods are the differences between them) will be in t(zx_idx) and the amplitudes will be in C(zx_idx) in that code.
  댓글 수: 2
mustafa alnasser
mustafa alnasser 2015년 10월 3일
Thank you but where is the code ?
Star Strider
Star Strider 2015년 10월 3일
It is in my Answer. I am reposting it here:
t = linspace(0, 10, 1000); % Time
C = 2 + sin(2*pi*t + cos(5*pi+t)*pi); % Signal
dC = diff([0, C])/(t(2)-t(1)); % Approximate Derivative
dCzx = dC .* circshift(dC, [0 -1]); % Negative Values => Zero Crossings (Mostly)
zx_idx = find(dCzx <= 0); % Derivative Zeros Are Maxima, Minima Of ‘C’
figure(1)
plot(t, C)
hold on
plot(t(zx_idx), C(zx_idx), 'or')
hold off
grid
axis([xlim 0 5])

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

추가 답변 (1개)

Image Analyst
Image Analyst 2015년 10월 3일
As you know, any arbitrary signal can be considered as a weighted sum of a bunch of sine waves - that's the whole concept of Fourier analysis. I suggestion you look at the fft() function or the pwelch() function.
  댓글 수: 2
mustafa alnasser
mustafa alnasser 2015년 10월 3일
Thank you but where is the code ?
mustafa alnasser
mustafa alnasser 2015년 10월 3일
sorry for the second answer.
For your answer i have already did that but i could not figure out how use FFT to do that

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by