Question: Matlab matrix optimization, dimension-problems: Maple 18

Hi

I am trying to optimize a 39, 1 MATLAB matrix, but cannot seem to get a result beyond a 6, 1 matrix. I am getting "Warning, cannot resolve types, reassigning t##'s type" where t## varies from each time I run it, and can show multiple of these warnings. It also says "Warning, cannot translate list".

 

I found a pretty similar problem posted here earlier, where the user "Carl Love" suggested to replace a command from the original code with

Matlab(
     subsop([-1,1]= J, eval([codegen:-optimize](tmp, tryhard), pow= `^`)),
     output = string, defaulttype = numeric
);

 

I was wondering what exactly this command does? Can I apply it to my code to solve my problem? It yielded a result that looks (on the surface) as an optimized code, but I don't feel completely comfortable using it without being certain.

What I have done is simply to replace Matlab(tmp, optimize) with the suggested code above. My code is attached. Thanks in advance for any help.

OptiMatrix.mw

Please Wait...