MATLAB: How to properly write this equation exp(x)cos(y)

equationmatrix

I wrote it like exp(x).*cos(y) but I kept getting "Matrix dimensions must agree" as output

Best Answer

This might be what you want,
[y,x]=meshgrid(-1:0.5:1,-2*pi:0.5:2*pi);
exp(x).*cos(y)