Borrar filtros
Borrar filtros

How to find energy of a signal for a given range.

1 visualización (últimos 30 días)
SUBHAJIT KAR
SUBHAJIT KAR el 10 de Oct. de 2017
Editada: SUBHAJIT KAR el 10 de Oct. de 2017
I have a binary sequence. I have applied IIR Butterworth bandpass filter to the signal and plot the output with respect to the index of the input sequence.The index vary from 0 to 8000. Now I want to calculate the energy of output for index range 500 to 800 and 1200 to 1500.The code for the problem is
if true
% code
end
R = 0.992;
theta = (2*pi)/3;
b = [1 0 -1];
a = [1 -2*R*cos(theta) R^2];
u = filtfilt(b,a,x);
Y = abs(u).^2;
window = 30;
h = gausswin(2*window+1)./window;
Z = filter(h,1,Y);
P = Z/max(Z);
hold on
plot(P);
axis([0 8000 0 1.05])
Now I want to find the total energy of P for the ranges 500 to 800, 1200 to 1500 and 5400 to 6000. Is it possible? please suggest.

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by