git-svn-id: http://moon:8086/svn/matlab/trunk@153 801c6759-fa7c-4059-a304-17956f83a07c
10 lines
186 B
Matlab
Executable File
10 lines
186 B
Matlab
Executable File
% Power estimation on discrete signals
|
|
function [y,yf] = sm2(x,yi,arf)
|
|
|
|
N = length(x);
|
|
x(1) = x(1) + yi*(1/arf-1);
|
|
x = abs(x);
|
|
a = [1,-(1-arf)];
|
|
y = filter(arf,a,x);
|
|
yf = y(N);
|