I want to calculate this integration symbolically in Matlab:
syms z mu t k
f(z,mu) = exp(-(z-mu)^2);
a(t,k) = exp(-t/k);
int(f(z,mu)*a(t-z,k),z,[0,t])
But Matlab can't evaluate the result. Mathematica can easily compute this integral. I cannot send the terms from Mathematica to Matlab by MatLink so I decided to do everything in Matlab. Is there any way to compute this integral? I don't want to do this numerically because this would be slower than integrating symbolically and then giving it inputs.
Edit
The given answer works for the above example but it doesn't work for this one:
syms z mu t k del
f(z,mu) = exp(-((z-mu)/del)^2);
a(t,k) = exp(-t/k);
int(f(z,mu)*a(t-z,k),z,[0,t])
I divided (z-mu) in the exponential function by the symbolic variable del.
L(f*g) = L(f) L(g)wheref*gis the convolution of f and g and L is the Laplace transform. - Robert Dodierassumptionsin order to simply and help solve your problems. - horchler