Opened 9 years ago
Last modified 9 years ago
#3842 closed defect
Matrix Compiler Bug — at Version 2
Reported by: | jalpanchal | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Frontend | Version: | |
Keywords: | Cc: |
Description (last modified by )
Unable to compile sym matrix in the following code.
Error: Got type mismatch error, but matching types Real[4, 4].
This is a *COMPILER BUG*, please report it to https://trac.openmodelica.org/OpenModelica.
Code:
model Matrices parameter Real v[3] = {1,2,3}; parameter Real m1[2,3] = {{11, 12, 13}, {21, 22, 23}}; parameter Real m2[2,3] = [11, 12, 13; 21, 22, 23]; parameter Real m3[4,3] = [11, 12, 13; 21, 22, 23;31, 32, 33; 41, 42, 43]; parameter Real m4[4,4] = [1,2,3,4;4,3,2,1;5,6,7,8;8,7,6,5]; Real m0[3,3]; Real M2[2]; Real M3[3]; Real y[Boolean]; Real s1,s1a, s2[1,1]; Real dim, sizeR, sizeC, sym[4,4]; equation m0 = [m1;transpose([v])]; y = {3000,100}; M2= m2[2,2:3]; M3 = m3[2:4,3]; s1 = v*v; s2 = transpose([v])*[v]; s1a = scalar(s2); dim = ndims(m3); sizeR = scalar(size(m3)*[1;0]); sizeC = scalar(size(m3)*[0;1]); sym = symmetric(m4); end Matrices;
Change History (2)
comment:1 by , 9 years ago
Component: | *unknown* → Frontend |
---|---|
Description: | modified (diff) |
comment:2 by , 9 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.