Opened 11 years ago

Closed 11 years ago

#2587 closed defect (fixed)

Matrix concatenation isn't simplified properly in some cases

Reported by: Per Östlund Owned by: somebody
Priority: normal Milestone: 1.9.1
Component: Frontend Version: trunk
Keywords: Cc:

Description

Matrix concatenation isn't simplified in cases such as these:

class BlockMatrix
  Real[3, 3]  P;
  Real[6, 6]  Q;
equation
  Q[1:3, 4:6] = [Q[1:3, 1:2], -Q[1:3, 3:3]];
  Q[4:6, 1:3] = [Q[1:2, 1:3]; -Q[3:3, 1:3]];
end BlockMatrix;

This results in the equations:

  Q[{1, 2, 3},{4, 5, 6}] = cat(2, Q[{1, 2, 3},{1, 2}], -Q[{1, 2, 3},{3}]);
  Q[{4, 5, 6},{1, 2, 3}] = cat(1, Q[{1, 2},{1, 2, 3}], -Q[{3},{1, 2, 3}]);

but cat should be simplified into matrix expressions in this case.

Change History (1)

comment:1 by Per Östlund, 11 years ago

Resolution: fixed
Status: newclosed

Fixed in r19160.

Note: See TracTickets for help on using tickets.