[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: invfreqs broken?
From: |
John W. Eaton |
Subject: |
RE: invfreqs broken? |
Date: |
Fri, 03 Aug 2007 13:50:56 -0400 |
On 3-Aug-2007, Schirmacher, Rolf wrote:
|
| Tracing the problem back as indicated gives in invfreq, line 76:
|
| if nargin < 8, tr = ''; end
|
| and in line 84:
|
| if tr == 'trace'
|
| The latter check seems to be the one that breaks. Indeed, doing
|
| octave.exe> tr = 'a';
| octave.exe> if tr == 'trace'
| > disp('successs')
| > end
| octave.exe>
|
| does nothing (as expected) and especially do not give errors, but
|
| octave.exe> tr = '';
| octave.exe> if tr == 'trace'
| > disp('success')
| > end
| error: mx_el_eq: nonconformant arguments (op1 is 0x0, op2 is 1x5)
| error: evaluating binary operator `==' near line 14, column 7
| error: if: error evaluating conditional expression
| error: evaluating if command near line 14, column 1
| octave.exe>
|
| breaks. It looks like == does not handle empty strings correctly. As I am
| not that deep inside octave, perhaps there are some ideas out there?
The == operator requires that the operands have the same size. To
compare character strings, you should use strcmp, strncmp, etc.
Note that the invfreq* functions are part of an Octave Forge package,
not Octave itself, so this problem should be reported to the
address@hidden mailing list.
jwe