Easy Wavelet capability - got it right finally
Marc Normandin
mnormand at iupui.edu
Wed Aug 13 13:43:10 CDT 2008
John W. Eaton wrote:
> On 12-Aug-2008, Marc Normandin wrote:
>
> | WavePath.m does a check for what kind of system you're running in order
> | to decide whether to use / or \ to separate directory names in the path.
> | It looks like it doesn't recognize your system type because Octave is
> | running through cygwin or something similar.
> |
> | Could you run the following commands in Octave and report the results
> | back?
> |
> | 1. computer
> | 2. isunix
> | 3. ispc
> |
> | With that information I should be able to make a quick fix to WavePath.m.
>
> Wouldn't it be better to use the fullfile to concatenate filename
> components instead of trying to determine the separator? Using
> fullfile should be portable to recent versions of both Octave and
> Matlab and wouldn't depend the return value from any of these
> functions.
>
> jwe
Thanks, John, for suggesting the fullfile command, and Matthias, for
suggesting filesep in a subsequent post. I wasn't aware of these
functions until you mentioned them. (Seems the WaveLab crew didn't know
of them either.)
Using fullfile would make for a clean solution, but would have required
more substantial changes because the original file concatenates the
directories and path explicitly. For the dual reasons of laziness and
desire to leave the structure of the original as intact as possible, I
simply modified the existing definitions of variables to use filesep and
pathsep in place of system-specific, hard-coded values. The modified
file is attached.
Ran the script and successfully added Wavelab directories to the path on
Ubuntu 8.04 (Octave 3.0.0) and Windows XP (Octave 3.0.0 MSVC).
--
------------------------------------------------------------------
Marc D. Normandin http://web.ics.purdue.edu/~mdnorman
Graduate Research Assistant mnormand at iupui.edu
Indiana University School of Medicine 317-278-9841 (tel)
Department of Radiology, Division of Research 317-274-1067 (fax)
------------------------------------------------------------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: WavePath.m
Url: https://www.cae.wisc.edu/pipermail/help-octave/attachments/20080813/c4de84e7/attachment.ksh
More information about the Help-octave
mailing list