octave-maintainers
[Top][All Lists]
Advanced

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

Re: Freqz behavior


From: Doug Stewart
Subject: Re: Freqz behavior
Date: Fri, 16 Jan 2015 16:57:25 -0500



On Fri, Jan 16, 2015 at 12:02 PM, Rik <address@hidden> wrote:
On 01/16/2015 05:31 AM, Doug Stewart wrote:
> On Thu, Jan 15, 2015 at 8:42 PM, Rik <address@hidden> wrote:
>
>     On 01/15/2015 05:35 PM, Doug Stewart wrote:
>>     On Thu, Jan 15, 2015 at 4:44 PM, Rik <address@hidden> wrote:
>>
>>         1/15/15
>>
>>         Could someone with access to the Signal Toolbox run the following:
>>
>>     I think Rik means some one with Matlab Signal Toolbox
>>
>>
>>         format long
>>         [a,b] = freqz (1, [1, -0.5, 0.8], 10)
>>
>>         Trying to resolve this bug https://savannah.gnu.org/bugs/?43895
where
>>         Octave is apparently off by 1 point.
>>
>>         --Rik
>>
>>
>     Thanks,  I've already been helped out by Tallis Huther da Costa.
>
>     --Rik
>
> How does Matlab handle this?

They do just what we thought.  When you request the output of freqz it
produces a vector with N elements.  When you don't request an output, and
want to have the filter response immediately plotted, they produce a vector
of N+1 elements.  I have a patch, but it only works if the "whole" argument
is not specified.  I'll send that to you and maybe you can see how to tweak
things.

[h,w] = freqz (b,a, N);     # h and w are N-point vectors
freqz (b, a, N);  # h and w are N+1-point vectors as determined by get (h,
'xdata') and get (h, 'ydata') on the created plot.

--Rik


What handle did you use to get the x and y size??
I tried
figure(3)
freqz1 (1, [1, -0.5, 0.8], 10 , "whole")
h = gca ()
get (h)
get (h, 'ydata')

And i get:
error: get: unknown axes property ydata


I have it working for "whole" but I want to verify it against Matlab before I finish it up.

Doug

--
DASCertificate for 206392


reply via email to

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