octave-maintainers
[Top][All Lists]
Advanced

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

Fwd: Help testing freqz (Doug Stewart)


From: Doug Stewart
Subject: Fwd: Help testing freqz (Doug Stewart)
Date: Fri, 30 Jan 2015 16:44:08 -0500


---------- Forwarded message ----------
From: Doug Stewart <address@hidden>
Date: Fri, Jan 30, 2015 at 4:42 PM
Subject: Re: Help testing freqz (Doug Stewart)
To: Antoine Wiedmer <address@hidden>



Please reply at the bottom to allow those who arrive late to read from top to bottom.

On this list we always post inline or at the bottom.



On Fri, Jan 30, 2015 at 2:53 PM, Antoine Wiedmer <address@hidden> wrote:
This on Matlab

freqz (1, [1, -0.5, 0.8],linspace(0,0.9,10),1);

gives the same than with octave


On 30.01.2015 20:25, Doug Stewart wrote:


On Fri, Jan 30, 2015 at 2:02 PM, Antoine Wiedmer <address@hidden> wrote:
The output is:

ans =

         0    0.2000    0.4000    0.6000    0.8000    1.0000 1.2000    1.4000    1.6000    1.8000    2.0000

but:

>> size(ans)

ans =

     1    11


This does not make sense.
so the graph goes to 1.8 and the data for the graph goes to  2.0???????

 
On 30.01.2015 19:10, Doug Stewart wrote:
Would someone with Matlab run this code and see what the last value of x is.

on octave I get:

Column 10:

   1.80000



freqz (1, [1, -0.5, 0.8], 10, 'whole');
subplot (2,1,1);
h = get (gca, 'children');
get (h, 'xdata')






and if I do:

>> get (h, 'ydata')

ans =

   -2.2789    0.3236   14.0514   -0.6138   -5.8441   -7.2346   -5.8441   -0.6138   14.0514    0.3236       Inf

So matlab calculates 11 data points out to 2.0 but the Y value for the last point is Inf , and therefore the plotting engine does not plot the last point, That is why the graph stops at x=1.8


I don't think we should copy this kind of error. so my opinion is to go with the patch that I made.
see 

But if Rik wants to do it matlab's way then I will do it.
Doug



--
DASCertificate for 206392


reply via email to

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