octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in "inv" from Octave 3.3.52?


From: Lukas Reichlin
Subject: Bug in "inv" from Octave 3.3.52?
Date: Sun, 26 Sep 2010 12:38:35 +0200

Dear Octave Community

I noticed a problem with "inv" from Octave 3.3.52 and "control/inst/@lti/inv.m" 
[1]. Interestingly, the first attempt (see examples below) succeeds, while 
subsequent calls fail (inv: wrong type argument `class'). This problem doesn't 
occur on Octave 3.2.4. I'm using MacOSX 10.6.4 and an up-to-date MacPorts 
installation. Shall I file a bug report for Octave 3.3 or do I need to change 
something in my package? [1]

Thanks in advance for your help and best regards,
Lukas


[1]
control, SVN Revision 7773. "pkg install" takes about 90 seconds. First public 
release planned on arrival of Octave 3.4.
http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/control/


IMPLEMENTATION NOTES:
* "State-Space" (@ss/ss.m) and "Transfer Function" (@tf/tf.m) models are both 
inherited from class "Linear Time Invariant" (@lti/lti.m).
* Overloaded operators like "inv" are located inside control/inst/@lti.
* @lti/inv.m is also called by @lti/mrdivide.m (used in example 1)


## =======================
## Example 1
## =======================

GNU Octave, version 3.3.52
Copyright (C) 2010 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "x86_64-apple-darwin10.4.0".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news'.




octave:1> test_control
PASSES 66 out of 66 tests
PASSES 2 out of 2 tests
PASSES 2 out of 2 tests
PASSES 6 out of 6 tests
PASSES 3 out of 3 tests
PASSES 3 out of 3 tests
PASSES 3 out of 3 tests
PASSES 2 out of 2 tests
PASSES 5 out of 5 tests
PASSES 4 out of 4 tests
PASSES 3 out of 3 tests
PASSES 4 out of 4 tests
PASSES 1 out of 1 tests
PASSES 2 out of 2 tests
PASSES 2 out of 2 tests
PASSES 2 out of 2 tests
PASSES 1 out of 1 tests
PASSES 1 out of 1 tests
PASSES 16 out of 16 tests
octave:2> test_control
  ***** shared a
 s = tf ("s");
 G = (s+1)*s*5/(s+1)/(s^2+s+1);
 a = G(1,1).num{1,1}(1);
!!!!! test failed
inv: wrong type argument `class'
shared variables {
  a = [](octave:3> test_control
octave:4> test_control
octave:5> 

BTW: Note the "forgotten" output after command 3 and 4. I've never seen such 
problems in Octave 3.2.x 


## =======================
## Example 2
## =======================

octave:1> sys = ss (-1, 1, 1, 0)

sys.a =
       x1
   x1  -1

sys.b =
       u1
   x1   1

sys.c =
       x1
   y1   1

sys.d =
       u1
   y1   0

Continuous-time model.
octave:2> sysi = inv (sys)

sysi.e =
       x1  x2
   x1   1   0
   x2   0   0

sysi.a =
       x1  x2
   x1  -1   1
   x2   1   0

sysi.b =
       u1
   x1   0
   x2  -1

sysi.c =
       x1  x2
   y1   0   1

sysi.d =
       u1
   y1   0

Continuous-time model.
octave:3> sysi = inv (sys)
error: inv: wrong type argument `class'
octave:3> which inv
`inv' is a function from the file 
/opt/local/libexec/octave/3.3.52/oct/x86_64-apple-darwin10.4.0/inv.oct
octave:4> sysi = inv (sys)
error: inv: wrong type argument `class'
octave:4> sysi = inv (sys)
error: inv: wrong type argument `class'
octave:4> 

## =======================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]