Integration of data with discrete values
    2 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Athira Surendran
 am 5 Feb. 2017
  
    
    
    
    
    Kommentiert: Star Strider
      
      
 am 6 Feb. 2017
            I've amplitude-time data (discrete data) of a signal. I want to find the power of the signal using the algorithm in figure. I'm unable to do the Integration part. Can someone please help me?? (Data file attached)

0 Kommentare
Akzeptierte Antwort
  Star Strider
      
      
 am 5 Feb. 2017
        This calculates the power using numerical integration, then integrates it. Either the cumtrapz or trapz call should work for you.
[D,S,R] = xlsread('data.xls');
Amplitude = D(1,:);
Time = D(2,:);
Power = Amplitude.^2;                                       % Data Are Real, ‘abs’ Not Necessary
Cumulative_Integral = cumtrapz(Time, Power);
Total_Power = trapz(Time, Power);
2 Kommentare
  Star Strider
      
      
 am 6 Feb. 2017
				The ‘Power’ signal doesn’t seem to be noisy. I don’t know what you want to do with a ‘smoothing filter’. Two options I can suggest are the Savitizky-Golay filter (the sgolayfilt function) and the envelope function (also see the hilbert function). A lowpass filter is also an option, however the others are likely easier considering the nature of your signal.
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Digital Filter Analysis finden Sie in Help Center und File Exchange
			
	Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!