Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

quada (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: integration

Requires: MathScript RT Module


q = quada(fun, a, b)

q = quada(fun, a, b, tolerance)

[q, fcnt] = quada(fun, a, b, tolerance)

Legacy Name: quad


Uses the adaptive Lobatto quadrature method to evaluate the integral of a function numerically.



Name Description
fun Specifies the name of the function, defined and saved in a .m file, whose numerical integral you want to compute. The function you specify must accept and return a real, double-precision scalar. fun is a string.
a Specifies the lower bound of the integral. a is a real, double-precision scalar.
b Specifies the upper bound of the integral. b is a real, double-precision scalar.
tolerance Controls the accuracy of the quadrature integration. A smaller tolerance leads to a more accurate result but more computation time. The default is 1E-6.


Name Description
q Returns the result of the integration.
fcnt Returns the number of times LabVIEW calls fun during the adaptive integration.


The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine No
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized


% The myfun function is defined by:
% function f = myfun(x)
% f = exp(-2*x)
[q, fcnt] = quada( 'myfun', 0, 1, 1e-5 )
q = quada ('sin', 0, 1)

Related Topics



Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit