MATLAB: I want to sum of M? I’m using this command but I’m unable to get the numerical value? only getting sum equation? How to get the values.Is there any idea? Thanks in advance

symsum

syms n x t
D=1.32e-9
t=0:5/20:5
L=.2
x=0:(L/20):L
F=4*L^2/(D*(2*n+1)^2*pi^2)*(exp(D*(2*n+1)^2*pi^2*t/(4*L^2))-1); % last int good values
G= (2*n+1)*pi*D*(-1)^n/(2*L) ;
E= cos ((2*n+1)*pi*x/(2*L));
H= exp(-D*(2*n+1)^2*pi^2*t/(4*L^2));
M=(H.*E)
C= (symsum(M,n,0,10))

Best Answer

syms n
D=1.32e-9
t=0:5/20:5
L=.2
x=0:(L/20):L
F=4*L^2/(D*(2*n+1)^2*pi^2)*(exp(D*(2*n+1)^2*pi^2*t/(4*L^2))-1); % last int good values
G= (2*n+1)*pi*D*(-1)^n/(2*L) ;
E= cos ((2*n+1)*pi*x/(2*L));
H= exp(-D*(2*n+1)^2*pi^2*t/(4*L^2));
M=(H.*E)
C= double(symsum(M,n,0,10))
Related Question