<< ToMatlab.m

?ToMatlab

?PrintMatlab

?WriteMatlab

a = (x + y)^20 // Expand

ToMatlab

ToMatlab[a]

ToMatlab[a, "a"]

ToMatlab[a, 150]

ToMatlab[a, "a", 150]

PrintMatlab

PrintMatlab[a]

PrintMatlab[a, "a"]

PrintMatlab[a, 150]

PrintMatlab[a, "a", 150]

WriteMatlab

Directory[]

f = OpenWrite["tomatlab-test1.m"]

WriteMatlab[a, f]

WriteMatlab[a, f, "a"]

WriteMatlab[a, f, 120]

WriteMatlab[a, f, "a", 120]

Close[f]

WriteMatlab[a, "tomatlab-test2.m"]

WriteMatlab[a, "tomatlab-test3.m", "a"]

WriteMatlab[a, "tomatlab-test4.m", 120]

WriteMatlab[a, "tomatlab-test5.m", "a", 120]