|
`glob' and string array to cell conversion: msg#00073gnu.octave.bugs
While using `glob' (2.1.64), the following code doesn't give the expected results: octave:1> for f = glob('*'), disp(f), end I expected a printout of the files in the current directory, but, because `glob' returns a cell array of dimension Nx1, instead one cell array is printed. Would a simple patch like the one below fix the problem, or is more invasive surgery needed? Regards Stefan --- Cell.cc 2005-01-20 16:28:50.000000000 +0200 +++ Cell.cc.new 2005-04-29 00:24:22.000000000 +0200 @@ -36,10 +36,10 @@ Cell::Cell (const string_vector& sv) if (n > 0) { - resize (dim_vector (n, 1)); + resize (dim_vector (1, n)); for (int i = 0; i < n; i++) - elem(i,0) = sv[i]; + elem(0,i) = sv[i]; } } ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html ------------------------------------------------------------- |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Small caps (@sc) not parsed correctly in some warning messages: 00073, John W. Eaton |
|---|---|
| Next by Date: | Re: MacOS X 10.3.9 build but load-save.m test failure: 00073, Dmitri A. Sergatskov |
| Previous by Thread: | Small caps (@sc) not parsed correctly in some warning messagesi: 00073, Dmitri A. Sergatskov |
| Next by Thread: | delete key does not work anymore with octave 2.1: 00073, fred |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |