I have a a function $f(k)$ (calculated in Maple) which is huge and stored in a variable called 'sum' on my drive (with the help of 'save' command in Maple). Since the function is huge, Maple is unable to plot it and is taking endless time. Thus, I want to read the variable 'sum' into Matlab and plot it. I am unable to also just copy paste as the function is really big. I have searched around but am unable to find a solution. Can somebody help me out?
A simple example here:
with(CodeGeneration); suma := sum(sin(n*x)/factorial(n), n = 0 .. 10);
cg3 = sin(x) + sin(0.2e1 * x) / 0.2e1 + sin(0.3e1 * x) / 0.6e1 + sin(0.4e1 * x) / 0.24e2 + sin(0.5e1 * x) / 0.120e3 + sin(0.6e1 * x) / 0.720e3 + sin(0.7e1 * x) / 0.5040e4 + sin(0.8e1 * x) / 0.40320e5 + sin(0.9e1 * x) / 0.362880e6 + sin(0.10e2 * x) / 0.3628800e7;
Off course, you can store this in a string and then write it to a text file, or translate a Maple procedure to a Matlab function.