I'm trying to plot this complicated graph using Matlab.

I've used 10 instead of Inf but the code doesn't work. Could you please teach me how to fix the sigma sum part? The error says:
Unrecognized function or variable 'n'.
Error in @(x)((-0.07305.*x.^5+2.813.*x.^4-39.78.*x.^3+249.5.*x.^2-640.5.*x+1073).*cos(n*pi.*x/6)./6)
Error in integralCalc/iterateScalarValued (line 314)
fx = FUN(t);
Error in integralCalc/vadapt (line 132)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 75)
[q,errbnd] = vadapt(@AtoBInvTransform,interval);
Error in integral (line 87)
Q = integralCalc(fun,a,b,opstruct);
a = @(x) ((-0.07305.*x.^5+2.813.*x.^4-39.78.*x.^3+249.5.*x.^2-640.5.*x+1073).*cos(n*pi.*x/6)./6);
b = @(x) ((-0.07305.*x.^5+2.813.*x.^4-39.78.*x.^3+249.5.*x.^2-640.5.*x+1073).*sin(n*pi.*x/6)./6);
c = integral(a,-6,6)
d = integral(b,-6,6)
e = c.*cos(n*pi.*x./6)+d.*sin(n*pi.*x./6)
g_symsum = symsum(e,n,1,10)+4796.1296
plot(x,g)
It is because you are using $n$ without defining it first. Rather do something like