From: Daniel J S. <dan...@ie...> - 2004-08-10 14:42:38
|
Hans-Bernhard Broeker wrote: >On Mon, 9 Aug 2004, Daniel J Sebald wrote: > > > >>Sure, but it would have to be done inside the freqz.m file. >> >> > >I thought that was exactly what I said: that since it's this octave script >that is deciding that the xrange is going to be [0:1.99805], it's the >script's job to fix it up. > > > >>to recognize that 1023/512 is very close to 2.0. That is why I suggest >>some code somewhere that rounds the borders outward to the nearest, say, >>1% of the overall width. >> >> > >If you make "somewhere" be that octave script, I can agree with that. > >gnuplot already has such code, but by setting an explicit xrange, the >script is disabling it. > The algorithm I'm describing is probably more difficult than just rounding to the nearest 1%, or whatever. One really wants to round up (for right border) to nearest 10^p, 10^p-1, 10^p-2, where p is the power, or exponent, associated with right border. But the point is mute, in this case, because actually, now that I think about it, that Octave script is kind of lame. The sample rate is an argument of the freqz() routines. So why not just set the range to [0:Fs/2], rather than reading the maximum range from the frequency vector? I'll send a note to the Octave list. Dan |