[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "warning" control syntax difference between Matlab and Octave 3.6.1
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: "warning" control syntax difference between Matlab and Octave 3.6.1 |
Date: |
Wed, 2 May 2012 14:20:27 -0400 |
On 2 May 2012 12:53, Stefan <address@hidden> wrote:
> I am trying to run a 3rd party library that was originally written
> for Matlab under Octave 3.6.1 under Mac OS X. The library uses the
> following (apparently undocumented) syntax to temporarily switch off
> warnings:
If this really is undocumented Matlab syntax, can we consider this a
bug in the library for relying on undocumented Matlab syntax? Chasing
after obscure and unknown Matlab behaviour is not fun and usually of
limited usefulness.
>>> w0 = warning;
>>> warnoffId = 'MATLAB:singularMatrix';
>>> warnstat = warning('query',warnoffId);
>>> warnoff = warnstat;
>>> warnoff.state = 'off';
>
>>> warning(warnoff); %update warning status
>>> % ... do things without warnings thrown
>>> warning(warnstat); %reset warning status
>>> w = warning;
[snip]
> This breaks the warning system of Octave, such that virtually every
> subsequent command spams the console with warning messages.
>
> I would much like to use the unmodified library m-files. I read
> somewhere that a difference between Matlab and Octave is usually
> considered a bug in Octave... Is it in this case?
Probably. While we decide what to do with this, please file a bug
report in the Matlab compatibility category:
http://www.octave.org/bugs.html
Thanks,
- Jordi G. H.