Question: Maple CodeGeneration exports matrix wrong

Hello,

I'm using the command

Matlab(AA,resultname="A",optimize=tryhard)

to generate Matlab code for a quite big matrix. The first problem is, that I get a lot of the following warnings

Warning, cannot resolve types, reassigning t33's type

for a bunch of different t** variables. When I copy the generated code to Matlab I get the error: 'Dimensions of arrays being concatenated are not consistent.'

I found that some entries are obviously transposed like

t50 = [0 0 0 0 0 0 t34 0 0 0 0 -t33 t37 0 0 0 0 0 -t44 0 0 0 0 0 t49 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];

should be a column vector. Here is a snippet of how the resulting matrix A is constructed (I can't show the full code because it consists of some 100 lines):

A = [t50 t97 t143 t190 t237 t261 ... ]

I tried to manually transpose the entries. The matrix can be generated but the dimension is wrong, hence, it must be a wrong matrix then. Does anyone know what could be the reason for this? I generate the matrix via the Hessian-command

 

Please Wait...