#This is an example of menu for qtoctave

menu_name= Integrate Function

input_label= Function name f(x)
input=sin(x)/x

input_label= 1st limit of integration
input=-2*pi

input_label= 2st limit of integration
input=2*pi

input_label= Tolerance
input=1e-20

input_label= Sing
input=[0]

output_label= Value
output=v

output_label=ier
output=ier

output_label= nfun
output=nfun

output_label=err
output=err

begin{help}
<html>
<b>Integrate a nonlinear function of one variable using Quadpack.</b><br>

The first argument is the name of the function, the function handle or the inline function to call to compute the value of the integrand. It must have the form:<br>
y = f (x)<br>
where y and x are scalars.<br>
This parameter is a string. Ex.:<br>
[v, ier, nfun, err] = quad (@(x) f, 0, 3)<br><br>

The second and third arguments are limits of integration. Either or both may be infinite.<br><br>

The argument <i>Tolerance</i> is a vector that specifies the desired accuracy of the result. The first element of the vector is the desired absolute tolerance, and the second element is the desired relative tolerance. To choose a relative test only, set the absolute tolerance to zero. To choose an absolute test only, set the relative tolerance to zero.<br><br>

The argument <i>sing</i> is a vector of values at which the integrand is known to be singular.<br><br>

The result of the integration is returned in v. ier contains an integer error code (0 indicates a successful integration). The value of nfun indicates how many function evaluations were required, and err contains an estimate of the error in the solution.<br><br>

You can use the function quad_options to set optional parameters for quad.<br>

</html> 
end{help}

begin{command}
[%o1%, %o2%, %o3%, %o4%] = quad (@(x) %i1%,%i2%,%i3%,%i4%,%i5%)
end{command}
