Opened 12 years ago

Last modified 12 years ago

#2033 closed defect

matrix() operator gives error in frontend — at Version 2

Reported by: Bruno Scaglioni Owned by: somebody
Priority: high Milestone: 1.9.0
Component: Frontend Version: trunk
Keywords: matrix Cc: Francesco Casella, Adrian Pop

Description (last modified by Martin Sjölund)

instantiating the model:

model testEq
parameter Integer M=5;
parameter Real a[M]=zeros(M);
Real b[M,1];
equation 
    b = matrix(a);
end testEq;

gives error during flattening:

Type mismatch in equation {{b[1,1]}, {b[2,1]}, {b[3,1]}, {b[4,1]}, {b[5,1]}}={{a[1]}, {a[2]}, {a[3]}, {a[4]}, {a[5]}} of type Real[5, 1]=Real[5, 1]

Change History (2)

comment:1 by Bruno Scaglioni, 12 years ago

Cc: Adrian Pop added; adrpop Willi Braun removed

comment:2 by Martin Sjölund, 12 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.