help-octave
[Top][All Lists]

## Re: Using sftrans as matlab's lp2lp

 From: texidor Subject: Re: Using sftrans as matlab's lp2lp Date: Thu, 12 Nov 2015 02:45:13 -0800 (PST)

```Thanks a lot.
Can someone say why there is no lp2lp2 function calling sftrans? Does not
seem like a hard work and would help matlab compatibility.
Just suggesting because I did it now to help myself.

Thanks again. Problem solved.

2015-11-11 16:04 GMT-02:00 Mike Miller-4 [via Octave] <

> On Tue, Nov 10, 2015 at 19:32:25 -0800, texidor wrote:
>
> > Hi,
> > I have been porting some code but I can not have equal results to moving
> > lowpass' filter cuting frequency using the sftrans and lp2lp.
> >
> > numNorm =
> >          0         0         0    1.0000
> > denNorm =
> >     1.0000    2.0000    2.0000    1.0000
> > fc=180
> >
> > Matlab code uses:
> > [num,den]=lp2lp(numNorm,denNorm,2*pi*fc);
> > and returns:
> > num =
> >    1.4466e+09
> > den =
> >    1.0e+09 *
> >     0.0000    0.0000    0.0026    1.4466
> >
> > The octaves function have been seted:
> > [num,den,sg]=sftrans(numNorm,denNorm,1,2*pi*fc,0);
> >
> > returns:
> > num =  1131.0
> > den =
> >    1131.0   2261.9   2261.9   1131.0
> >
> > sg =   1.4466e+009
> >
> >
> > Thanks in advance.
>
> Hi, did you see that the arguments to the sftrans function are the
> zero-pole-gain form of the filter? The following gives the same answer
> that you reported getting with Matlab:
>
>     [z, p, k] = tf2zp (numNorm, denNorm);
>     [z, p, k] = sftrans (z, p, k, 2*pi*fc, false);
>     [num, den] = zp2tf (z, p, k);
>
> Cheers,
>
> --
> mike
>
> _______________________________________________
> Help-octave mailing list
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4673441&i=0>
> https://lists.gnu.org/mailman/listinfo/help-octave
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://octave.1599824.n4.nabble.com/Using-sftrans-as-matlab-s-lp2lp-tp4673435p4673441.html
> To unsubscribe from Using sftrans as matlab's lp2lp, click here
> <http://octave.1599824.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4673435&code=ZGFuaWVsLnRleGlkb3JAZ21haWwuY29tfDQ2NzM0MzV8MzQwNzE3NzE3>
> .
> NAML
>

--
View this message in context:
http://octave.1599824.n4.nabble.com/Using-sftrans-as-matlab-s-lp2lp-tp4673435p4673450.html
Sent from the Octave - General mailing list archive at Nabble.com.

```

reply via email to