help-octave
[Top][All Lists]
Advanced

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

Re: filter.oct


From: Hillel Rosensweig
Subject: Re: filter.oct
Date: Fri, 25 Feb 2011 03:19:07 -0800 (PST)

thanks for that,

I did the same and it does work, but when I run it on large inputs (> 1,000,000),
it is quite a bit slower than the matlab version.

for filter order (m) and signal order (n) it seems to be running on complexity O(m*n)
is there a faster algorithm than that (i heard there might be one with complexity O(n log m)

any ideas?


thanks
From: Esposito Francesco <address@hidden>
To: Hillel Rosensweig <address@hidden>; "address@hidden" <address@hidden>
Cc:
Sent: Friday, February 25, 2011 12:52 PM
Subject: Re: filter.oct

I need to implement a filter function in C language with the SAME behaviour of the Matlab one.

I solved the problem.....

I get the formula from http://www.mathworks.com/help/techdoc/ref/filter.html
of the "direct form II transposed" and i have added the effect of zi because my function call is like:

y=filter(b,a,x,zi);

where a and b are filter coefficient vectors
x is the input
and zi is the initial conditions

it seems to work fine.......

thanks everybody



On Fri, 25 Feb 2011 02:03:51 -0800 (PST)
Hillel Rosensweig <address@hidden> wrote:
>
>
> HI, I'm long time user, first time writer,
>
> I've been trying to implement the Octave 'filtert.oct' function in C. i built a function - 'filter.c' based on the information given in the online octave manual.
> the problem is that my code is relatively slow.
>
> I noticed that the actual function is a 'built-in' octave function and as such I cannot review the code it runs. As i understand it, the
> octave code is optimized beyond the naive algorithm and I was wondering whether the algorithm used is available for reading anywhere .
>
> in other words - how did you guys do it?
>
> thanks
>
> Hillel
>
>
>     





reply via email to

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