The approximate and exact solution are not corresponding. Please assist further. Here is my code:
alpha=0.25; r=5; t=0.002; x=[-5:0.2:5]; k = reshape(0:100, 1, 1, []); A=exp(x); B = (t.^(k.*alpha))./factorial(k).*alpha.^k; C = sum(B,3); Numerical=A.*C; Exact=A.*exp((r-4).*(t.^alpha)./(alpha)); Z1=Numerical; Z2=Exact; hZ1 = plot(x,Z1,'-r'); hold on hZ2 = plot(x,Z2,'-g'); hold off grid on xlabel('x') ylabel('u') legend([hZ1(1),hZ2(1)], 'CFRDTM','EXACT', 'Location','NE')