% % Compute the exponential function f(q) = q_2 exp(q_1 q_2) % function fun_vals = fun(x,y,nx,ny) for i=1:nx for j=1:ny fun_vals(i,j) = y(j)*exp(x(i)*y(j)); end end