Re: Need help with Wavelet Workbench [message #14830] |
Wed, 07 April 1999 00:00  |
jab7981
Messages: 1 Registered: April 1999
|
Junior Member |
|
|
On 7 Apr 1999 14:11:34 GMT, steinhh@ulrik.uio.no (Stein Vidar Hagfors
Haugan) wrote:
>
> In article <370b52f7.335334@news.frontiernet.net>
> jkbishop@frontiernet.net (Jonathan Bishop) writes:
>
>> When I put the 32768 point set in,
>> the data set gets truncated to 16384 points because
>> fix(alog(n_elements(x_work))/alog(2))) evaluates to 14 instead of
>> 15. alog(n_elements(x_work))/alog(2)) is given as 15.0000. Can
>> someone explain this so even a mechanical engineer can
>> understand?
>
> IDL> print,alog(32768)/alog(2),form='(g15.10)'
> 14.99999905
>
> It would be wiser in this case to use round() instead of
> fix() -- or use the logb() function I posted recently!
I thought of that, but naive use of round will make it think a dataset
of 32767 points is 2^15 points, then an array subscript will be out of
range. A kludge like round(100.*alog(...)/alog(2))/100 would at
least work here. I'll pass on using logb, though
something along those lines might be needed if WWB is overhauled
to use long data sets; I'll just comment out the check and be
careful, now that I know the cause.
The result is that WWB only works for datasets < 32768 in length
rather than <= 32768 in its original form.
>
> Regards,
>
> Stein Vidar
--
Jonathan Bishop
|
|
|