lowpassfilter

Anders Sneckenborg anders at simbalsyd.se
Wed Apr 14 22:19:29 CEST 2010


Hi

When running the following script I expected the filtered signal to have an amplitude of 0.5.
My intention was to lowpassfilter a signal with the same frequency as the cutoff frequency.  Am I doing something wrong?

//---------------------------
f1 = 0.1;      //Hz
tSamp = 0.01;  //s
tMax = 200;

t = 0:tSamp:tMax;
y = 1*sin(2*%pi*f1*t);  + 0.5*sin(2*%pi*f2*t);

Order = 1;
Fcutoff = 0.1;
Fs = 1/tSamp;
hz = iir(Order,'lp','butt',[Fcutoff/Fs 0],[0 0]);
sl = tf2ss(hz);
yf = flts(y,sl);

plot(t,y,'-b');
plot(t,yf,'-r');
//---------------------------

Best regards
Anders

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20100414/706e2acc/attachment.htm>


More information about the users mailing list