Question: Matlab code generation ... ???

When I want to generate matlab code of the following symbolic expression I got very strange result:

with(CodeGeneration);
Matlab(Sum(a(i), i = 1 .. N));
Warning, the function names {Sum, a} are not recognized in the target language
Warning, precedence for Range unspecified
Warning, cannot translate range
cg = Sum(a(i), i == (1..N));

 

Problem:Sum(a(i), i == (1..N));
This command has wrong matlab syntax!!!

 

Right matlab code should look like:

cg = sum(a);

Where can I found compete list of supported matlab built-in function? Is there any possibility how to get proper matlab code?

Is there any way how to convert more complex symbilic expressions to the Matlab???

Please Wait...