how to use matlab to calculate double integration?

73 Views Asked by At

I want to use Matlab to verify the result of double integration.

$$\int_{-w}^{w}\int_{l}^{x}e^{ay}\space dydx$$

I tried this one

func = @(x,y) (exp(a.*y));
result = integral2(func,l,x,-w,w);

But it didn`t work, how to deal with it?