Integration of data with discrete values
3 次查看(过去 30 天)
显示 更早的评论
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)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/160410/image.png)
0 个评论
采纳的回答
Star Strider
2017-2-5
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 个评论
Star Strider
2017-2-6
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Signal Generation and Preprocessing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!