help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filter Implementation


From: Doug Stewart
Subject: Re: Filter Implementation
Date: Mon, 3 Jul 2017 21:48:18 -0400



On Mon, Jul 3, 2017 at 8:30 PM, shall689 <address@hidden> wrote:
Fantastic!

It gives the correct response for various frequencies, If I use a1 =
0.985033202259162 instead of -0.985033202259162 in your code.

Thanks alot,
Stephen



--
View this message in context: http://octave.1599824.n4.nabble.com/Filter-Implementation-tp4683979p4683992.html
Sent from the Octave - General mailing list archive at Nabble.com.

_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave


Yes  you are correct. I had incorporated the minus sign into my code.

the correct code is


 t=0:0.001/1000:0.001;
x=2048*sin(2*pi*10000*t);
y(1) = b(1)*x(1) ;
for n=2:1001
y(n) = b(1)*x(n) + b(2)*x(n-1) - a(1)*y(n-1);
endfor

figure(2)
plot(t,x,t,y)

--
DASCertificate for 206392


reply via email to

[Prev in Thread] Current Thread [Next in Thread]