Hi, My problem is to calculate mean amplitude of the signal and plot it on the graph with signal course. Below you can see my source code:
y % signal vector, where [3083 1]= size(y)
Fs=100; L=length(y); NFFT = 2^nextpow2(L); Y = fft(y,NFFT)/L; f = Fs/2*linspace(0,1,NFFT/2+1); n1=1/100; %1
m1=L/100; %end
[a b]=size(y); nov=(m1-n1)/(a-1); x=n1:nov:m1;figuresubplot(2,1,1)plot(f,2*abs(Y(1:NFFT/2+1)),color) % amplitude spectrum
subplot(2,1,2)plot(x,y,'b') % course of the signal
Could you tell me how can I calculated mean amplitude based on this? Or maybe there exists another way to find it? When I used mean(abs(Y(1:NFFT/2+1))) and ploted it on the second subplot it was far away from signal…
Best Answer