|
From: | Doug Stewart |
Subject: | Re: freqz behavior for 'whole' |
Date: | Fri, 30 Jan 2015 18:26:35 -0500 |
On 01/30/2015 02:07 PM, address@hidden wrote:
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:
and if I do:
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')
>> 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.
There's no point in copying silly behavior. But I do like seeing the full symmetry of the function. Since the behavior is periodic, why not use the y-value at y==0 for the final point at y==2 rather than Inf?
--Rik
[Prev in Thread] | Current Thread | [Next in Thread] |