From: Daniel J S. <dan...@ie...> - 2004-08-09 15:32:45
|
Hans-Bernhard Broeker wrote: >>>The test case is quite unrealistic, actually --- users would almost >>>certainly never make such a choice consciously. >>> >>> > > > >>But Octave is the one that chooses it; as part of the freqz() command, >>and because I chose the number of FFT points to be a power of 2, for >>efficiency. >> >> > >Well, then I would suggest it's Octave that needs to be fixed. If >it wants to do all the work by itself, rather than letting gnuplot >help where it can, then it's Octave's responsibility to get it right. > >So let me see, that 1.99805 of yours is actually 1023/512, right? >Couldn't you use 1024/512, i.e. 2.0 instead? > > Sure, but it would have to be done inside the freqz.m file. The reason is that freqz.m generates a multiplot, and once it's generated, one can't say set xrange [0:2] replot because only the last plot will be redrawn. What you are proposing is 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. The reason is that if you fix gnuplot's algorithm so that the tic and grid line aren't drawn, it will appear odd because it seems so close that tic mark should be there (although technically it shouldn't). But expanding out to a "fractional whole", for lack of better phrase" would make things hunky dory. Of course, the same type of "rounding" operation could be done as part of the freqz.m script. I agree "set xrange [0:2]" would be a sufficient solution. However the multiplot problem complicates matters. Dan |