# Question on transition from Mathematica to Matlab using Tomatlab.m

Posted 5 months ago
525 Views
|
0 Replies
|
0 Total Likes
|
 I am trying to calculate some function with Mathematica and move it to the Matlab, and I would appreciate it if you help me. The Tomatlab.m produces Derivative(1)(sin)(2.*y) from Mathematica to Matlab. However, there is no function like Derivative(1)(sin)(2.*y) in Matlab. So, I was wondering how Derivative(1)(sin)(2.*y) is calculated? Is it cos(2.*y) or 2*cos(2.*y)? in Matlab Code?** The different representation says that Derivative(1)(sin)(2.*y) = sin'[2.*y]., but still not sure sin'[2.*y] = cos[2.*y] or 2cos[2.*y] Even if I use the Tomatlab.m file, I have to modify my code in Matlab to run the code. For example, I have to change (s+(-1).*t) to bsxfun(@minus,t,s'). Since my code is complicated, I have been struggling with the dimension error when I changed these things. Is there any function or file like Tomatlab.m that I can directly use the code output without modification? I saw that there is another function Math link that transfer the code output from Mathematica to Matlab. Any Ideas about this function? Thank you. exp(1).^(logsigma+(-1).*logthetat+(-2).*logthetax+(-1/2).*exp(1) ... .^((-1).*logthetat).*(s+(-1).*t).^2+(-1/2).*exp(1).^((-1).* ... logthetax).*(x+(-1).*y).^2).*(R.*((-1)+s)+(-1).*s).^(-1).*((-1).* ... exp(1).^(2.*logthetax).*R.*(s+(-1).*t)+exp(1).^logthetat.*(R.*(( ... -1)+s)+(-1).*s).*((x+(-1).*y).^2.*\[Alpha]+(-1).*exp(1).^logthetax.*\ (\[Alpha]+ ...R.*((-1).*x+y).*sin(2.*y))+2.*exp(1).^(2.*logthetax).*R.* ... **Derivative(1)(sin)(2.*y)**));