Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

quada (MathScript RT Module Function)

LabVIEW 2010 Help

Edition Date: June 2010

Part Number: 371361G-01

»View Product Info

Owning Class: integration

Requires: MathScript RT Module

Syntax

q = quada(fun, a, b)

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

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

Legacy Name: quad

Description

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

Details

Examples

Inputs

Name Description
fun Specifies the function 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.

Outputs

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

Details

This function is not supported in the LabVIEW Run-Time Engine. Do not use this function in a stand-alone application or shared library.

Examples

% 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

accumtrapint
quada_double
quada_nc8
quada_triple


 

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