calculate frequency energy from spectrum signal

Status
Not open for further replies.

Adnan86

Full Member level 2
Joined
Apr 4, 2013
Messages
121
Helped
26
Reputation
52
Reaction score
26
Trophy points
1,308
Visit site
Activity points
2,153
calculate frequency energy from spectrum signal in MATLAB

I am trying to calculat the energy spectrum of a signal in MATLAB.
for example I want calculate this ratio :
(low frequency energy (1 hz to 2 hz)) / (high frequency energy (4 hz to 5 hz)) in the spectrum of the discrete signal .

But, I have no idea how to get energy-Hz for each frequency components.

Any help is much appreciated !
 

at first we use FFT and then for get energy of signal we us SUM of square like this :

Code:
SS = Zigma[ (abs(FFT_Siagnal)).^2]

but SS it's energy of whole of signal . but i want enrgy of signal between for example 2 hz to 3 hz .
so haw i can do that ?
 

I could not find some reference about the Zigma function.
Can you place here the entire code ?



+++
 

Code:
%PSD
 
 FFT_HR_Siagnal = fft(HR_Siagnal,N);
 
 
 Square_HR_Siagnal = (abs(FFT_HR_Siagnal)).^2 ;
 % N,M should determin as Frequence but how ? I dont know !!!
 Energy_low = 0 ;
 for i= N1: N2
     Energy_low = Square_HR_Siagnal(i) + Energy_low ;
 end ;
%  subplot(1 2 1 ) ;
%  plot (Energy_low) ;
 
 Energy_high = 0 ;
 for i= M1:M2
     Energy_high = Square_HR_Siagnal(i) + Energy_high ;
 end ;
 
 AB = Energy_low / Energy_high ;
 

this is signal

- - - Updated - - -

instead N in first row use this :
FFT_HR_Siagnal = fft(HR_Siagnal,;
 

Attachments

  • HR_Signal.rar
    10 KB · Views: 84

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…