> Plus, h1_deriv takes ts as argument but doesn't do anything with it.
> Is something missing one the code?

This is probably a leftover from earlier experimentation and can be removed.

As additional background information, I tracked down the paper I used to write 
the code:

http://www.ingelec.uns.edu.ar/pds2803/Materiales/Articulos/Cavicchi--ImpulseInvarianceAndMultipleOrderPoles.pdf

I also found some feedback I got from Paul Kienzleback back in 2007. It
was in a private email and gives suggestions for optimizing the Octave
code:

1) Vectorize.  Octave has a slow interpreter, but the vector operations  
are fast.  E.g., functions such as polyrev can be written

   function y=polyrev(p), y=p(end:-1:1); end

2) Octave has prepad which is equivalent to pad_poly.

3) Octave/matlab have poly(p) which build a polynomial given its roots.  
  This is equivalent to:

    a=1; for i=1:length(p),a=conv(a,[1,-p(i)]); end

4) I suspect without having looked too closely at the code that  
inv_residue could be simplified with the use of the 'roots' function.

5) Test cases are always good.  E.g.,

   %!assert(impinvar(b,a),expected_output,tolerance)
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to