Question: About Matlab Code Generation and Optimize

Hello everybody,

I have this equation J:

> J := Matrix(2, 6, [[j41, j42, j43, j44, j45, j46], [j51, j52, j53, j54, j55, j56]]);

it's a 2 times 6 matrix made with the results of other equation, each one of those small j's are long analytical terms.

Later I want to generate a Matlab code of J using this:

> Matlab(J, resultname = "j4", output = "file.m", optimize);

I use the optimize code at the end because then I avoid getting a lengthy matrix. But then Maple generated the Matlab code assigning each element of the matrix in the following way:

j4(1,1) =

j4(1,2) =

j4(1,3) =

and so on. The question is, how can I change the Maple code to generate the Matlab code like this:

j41 =

j42 =

j43 = , and so on.

I want to avoid using several Matlab code generation lines in Maple because I want the program to optimize the whole matrix and take advantage of common terms. Thanks in advance!!!

Please Wait...