Mon 07 Mar 2016 05:57:48 PM UTC, original submission:
The core function fileattrib handles the wildcard character * differently then Matlab does, with respect to finding subdirectories and -files. I noticed this while search for an easy way for finding all subdirectories that lie in a given root directory.
Let's say we have to the following directory and file structure:
RootDir
|__Dir1
|__Subdir1
|__MyText.txt
|__Subdir2
|__Dir2
The following script will produce different outputs in Octave or Matlab.
Octave's output:
Matlab's output:
A slightly altered version of the script (notice the second wildcard below) will find the directories one layer below in Octave but will trigger an error in Matlab.
Again, Octave's output:
And the output of Matlab:
You get the point. Octave's fileattrib follows an other logic then Matlab's version does.
Tested this on Windows XP and 7.
|