<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<pre>Hello Anders,<br><br>Your filter is correctly designed and the magnitude response is also correct.<br>Check your graphic and you will see that the peak value of your waveform is 0.707 (i.e. sqrt(0.5)) which is the correct<br>value for the 1st order Butterworth filter you designed.<br><br><br>Rgds,<br><br>Dan<br><br>________________________________________________<br>Hi Julio<br> <br>How do you plot the freq response?<br> <br>Regards<br>Anders<br> <br>________________________________________<br>Från: Julio Gonzalez-Saenz [julio.gonzalez@ymail.com]<br>Skickat: den 15 april 2010 11:31<br>Till: users@lists.scilab.org<br>Ämne: Re: SV: [scilab-Users] lowpassfilter<br> <br>Hi Anders,<br> <br>I you plot the freq response of iir you see that the max value is around 0.75 same as your graphic shows.. I will take a closer look at the iir response..<br> <br>Regards,<br> <br>Julio Gonzalez-Saenz<br>www.part-time-scientists.com<br>www.neex-technologies.com<br> <br>________________________________<br>From: Anders Sneckenborg <anders@simbalsyd.se><br>To: "users@lists.scilab.org" <users@lists.scilab.org><br>Sent: Thu, 15 April, 2010 7:14:38<br>Subject: SV: [scilab-Users] lowpassfilter<br> <br>Hi again<br> <br>I edited the code (removed dead code) and here it is again. It will execute exactly as before but without the disturbing dead code.<br> <br>//---------------------------<br>f1 = 0.1; //Hz<br>tSamp = 0.01; //s<br>tMax = 200;<br> <br>t = 0:tSamp:tMax;<br>y = sin(2*%pi*f1*t);<br> <br>Order = 1;<br>Fcutoff = 0.1;<br>Fs = 1/tSamp;<br>hz = iir(Order,'lp','butt',[Fcutoff/Fs 0],[0 0]);<br>sl = tf2ss(hz);<br>yf = flts(y,sl);<br> <br>plot(t,y,'-b');<br>plot(t,yf,'-r');<br>//---------------------------<br> <br>/Anders<br> <br> <br>Från: Julio Gonzalez-Saenz [mailto:julio.gonzalez@ymail.com]<br>Skickat: den 14 april 2010 22:42<br>Till: users@lists.scilab.org<br>Ämne: Re: [scilab-Users] lowpassfilter<br> <br>Hi Anders,<br> <br>Can you please double check the semicolon on the function y definition? You also have a f1 and f2 but only f1 is defined..<br> <br>Regards,<br> <br> <br>Julio Gonzalez-Saenz<br>www.part-time-scientists.com<br>www.neex-technologies.com<br> <br> <br>________________________________<br>From: Anders Sneckenborg <anders@simbalsyd.se><br>To: "users@lists.scilab.org" <users@lists.scilab.org><br>Sent: Wed, 14 April, 2010 22:19:29<br>Subject: [scilab-Users] lowpassfilter<br>Hi<br> <br>When running the following script I expected the filtered signal to have an amplitude of 0.5.<br>My intention was to lowpassfilter a signal with the same frequency as the cutoff frequency. Am I doing something wrong?<br> <br>//---------------------------<br>f1 = 0.1; //Hz<br>tSamp = 0.01; //s<br>tMax = 200;<br> <br>t = 0:tSamp:tMax;<br>y = 1*sin(2*%pi*f1*t); + 0.5*sin(2*%pi*f2*t);<br> <br>Order = 1;<br>Fcutoff = 0.1;<br>Fs = 1/tSamp;<br>hz = iir(Order,'lp','butt',[Fcutoff/Fs 0],[0 0]);<br>sl = tf2ss(hz);<br>yf = flts(y,sl);<br> <br>plot(t,y,'-b');<br>plot(t,yf,'-r');<br>//---------------------------<br> <br>Best regards<br>Anders<br> <br> I<br> </pre> <br /><hr />Hotmail: Trusted email with Microsoft’s powerful SPAM protection. <a href='https://signup.live.com/signup.aspx?id=60969' target='_new'>Sign up now.</a></body>
</html>