The question is more than one year old, but maybe the answer is interesting to others as well. One possible way is:
And so on. The advantage is that you can use a lot more types of expressions if you enclose them in single quotes and Maple does not isue the infamous "Warning, The following variable name replacements were made: ..."
Matlab(t,resultname="t(1)"); # Does not work
Matlab(['t(1)'=t]); # Works
Another option is to generate the Matlab-code using sequencies:
seq(seq(Matlab(J[i,j], resultname = cat(VarName, convert(i, string),convert(j, string))), j = 1 .. Dimension(J)),i=1 .. Dimension(J));
Here the output name is constructed by concatenation of strings.