bugGNU Octave - Bugs: bug #66091, (control) MIMO transfer function...

 
 

bug #66091: (control) MIMO transfer function unexpected element subsasgn errors

Submitter:  Nicholas Jankowski <nrjank>
Submitted:  Wed 14 Aug 2024 08:41:48 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 14 Aug 2024 08:43:31 PM UTC, comment #1: 

cc maintainers

Nicholas Jankowski <nrjank>
Group Member
Wed 14 Aug 2024 08:41:48 PM UTC, original submission:  

tested with octave 9.2.0 and control 4.0.1
in matlab, you can assign individual elements of a MIMO transfer function:

Matlab 2024a

>> A = tf(magic(2))

A =

  From input 1 to output...
   1:  1

   2:  4

  From input 2 to output...
   1:  3

   2:  2

Static gain.
Model Properties
>> B = tf(zeros(2))

B =

  From input 1 to output...
   1:  0

   2:  0

  From input 2 to output...
   1:  0

   2:  0

Static gain.
Model Properties
>> B(1,1) = A(1,1)

B =

  From input 1 to output...
   1:  1

   2:  0

  From input 2 to output...
   1:  0

   2:  0

Static gain.
Model Properties
>> B(2,2) = tf([1 2], [3 4])

B =

  From input 1 to output...
   1:  1

   2:  0

  From input 2 to output...
   1:  0

        s + 2
   2:  -------
       3 s + 4

Continuous-time transfer function.
Model Properties


Octave issues an error on assignment:


> A = tf(magic(2))

Transfer function 'A' from input 'u1' to output ...

 y1:  4

 y2:  1

Transfer function 'A' from input 'u2' to output ...

 y1:  3

 y2:  2

Static gain.
>> B = tf(zeros(2))

Transfer function 'B' from input 'u1' to output ...

 y1:  0

 y2:  0

Transfer function 'B' from input 'u2' to output ...

 y1:  0

 y2:  0

Static gain.
>> B(1,1) = A(1,1)
error: lti: subsasgn: invalid subscripted assignment type '()'.  you must select an LTI key first, i.e.  sys.keyname(...) = ...
error: called from
    subsasgn at line 49 column 9
>> B(2,2) = tf([1 2], [3 4])
error: lti: subsasgn: invalid subscripted assignment type '()'.  you must select an LTI key first, i.e.  sys.keyname(...) = ...
error: called from
    subsasgn at line 49 column 9


there may be some workarounds, but this sort of functionality is in some of the MIMO matlab help examples, so we should probably expect it to work.

Nicholas Jankowski <nrjank>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nrjank
  • -email is unavailable- added by nrjank
  • -email is unavailable- added by nrjank
  • -email is unavailable- added by nrjank (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-08-14 nrjank Carbon-Copy- Added -email is unavailable-
        Carbon-Copy- Added -email is unavailable-
        Carbon-Copy- Added ttl

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code