Question: not too much options!

I wanted to create an *m file with many @(x)  Matrix(x) , each of these matrices is 6-by-something , the matrices are not big in size, but they contain a LOT of sin/cos functions (of x vector). The only option I found is to use 

str := CodeGeneration:-Matlab(var,resultname = varname,output = string):

However, this takes endless time to execute despite the fact that the Maple operation to generate these matrices is, more or less, takes an acceptable time, but converting it to Matlab and output a string is an endless operation. 

I technically don't know why! These are matrices, they are not code or anything, just matercies. . 

I have a high end pc yet I couldn't get this line above to be executed in reasnable time (up to 30min!)

Please Wait...