% integrate_volume.m
%  Description
%  q = integral3(fun,xmin,xmax,ymin,ymax,zmin,zmax)
%  approximates the integral of the function q = fun(x,y,z)
%  over the region xmin ≤ x ≤ xmax, ymin(x) ≤ y ≤ ymax(x) and
%  zmin(x,y) ≤ z ≤ zmax(x,y).
function integrate_volume
  diary('integrate_volume_m.out')
  format compact
  disp('integrate_volume.m running')
  xmin = 0.1
  xmax = 1.0
  ymin = 0.0
  ymax = 1.1
  zmin = 0.2
  zmax = 0.9
   
  disp('f(x,y,z)=x*z+y*y+2.0*x')
  disp('q = integral3(@f,xmin,xmax,ymin,ymax,zmin,zmax)')
  q = integral3(@f,xmin,xmax,ymin,ymax,zmin,zmax)
  diary off
  return

  function r=f(x,y,z)
    r=x .*z+y .*y+(2.0) .*x;
    return
  end
end


  
