From 7:00 PM CST Friday, January 24th - 7:00 PM CST Sunday, January 26th, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

evalfn (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: basic

Requires: MathScript RT Module

Syntax

evalfn(f)

[c, d, ...] = evalfn(f)

[c, d, ...] = evalfn(f, a, b, ...)

Legacy Name: feval

Description

Executes a function, in the form of a string, at run time. This function allows you to specify a function to execute dynamically at run time; however, evalfn causes reduced performance and is not supported on RT targets. [c, d, ...] = evalfn(f, a, b, ...) is equivalent to [c, d, ...] = f(a, b, ...).

Examples

Inputs

Name Description
f Specifies a LabVIEW MathScript function or a user-defined function. f is a string, such as 'sin'.
a, b Specify the inputs for the function you specify in f.

Outputs

Name Description
c, d Return the results from executing the function you specify in f.

Details

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

Examples

X = evalfn('rand', 2, 2)
Y = evalfn('inv', X)

F = 'sin';
C = evalfn(F, [1, 2, 3])

A = evalfn('rand', 2, 2)
[V, D] = evalfn('eig', A)

Related Topics

eig
eval
fsolve_zero
fsolve_zeros
inv
plotf
rand
sin

WAS THIS ARTICLE HELPFUL?

Not Helpful