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

MathScript RT Module

LabVIEW 2010 Help

Edition Date: June 2010

Part Number: 371361G-01

»View Product Info

June 2010, 373123A-01

LabVIEW MathScript is a text-based language you can use to write functions and scripts. You can process scripts using LabVIEW MathScript in the LabVIEW MathScript Window or a MathScript Node.

The MathScript RT Module provides MathScript support for Windows, Mac OS X, and Linux desktop applications. (Windows) If you purchase the LabVIEW Real-Time Module, you can use the MathScript Node and certain MathScript RT Module functions on RT targets.

Note Note  To determine if the MathScript RT Module is installed, open the Tools menu and check whether the MathScript Window item is present.

Functions and Scripts

MathScript Nodes

LabVIEW MathScript Window    

MathScript on Real-Time

© 2010 National Instruments Corporation. All rights reserved.


Table of Contents

Version 2010 Features and Changes
Writing a Function or Script

Defining a Function or Script
MathScript Function Syntax
Calling User-Defined Functions from LabVIEW MathScript
Using the LabVIEW MathScript Language

Data Types in LabVIEW MathScript
C Data Types in LabVIEW MathScript

Using MathScript Nodes

Adding a LabVIEW MathScript Node to a VI
Configuring the Data Type of MathScript Node Output Terminals
Debugging MathScripts

Enabling and Disabling Script Highlighting in MathScript Nodes
Using the LabVIEW MathScript Probe
Creating Global Variables in LabVIEW MathScript

Using the LabVIEW MathScript Window

Accessing Help for the LabVIEW MathScript Window
Clearing the Command History List
Clearing the Output Window
Copying Output Window Data
Exporting LabVIEW MathScript Window Data to a Text or Spreadsheet Program
Saving and Loading Data Files
Saving and Loading Scripts

Guidelines for Using LabVIEW MathScript in Real-Time Applications

MathScript Syntax Suitable for Real-Time Applications

MathScript Error Codes

MathScript RT Module Functions

MathScript RT Module Functions Not Supported in the LabVIEW Run-Time Engine

Support for MathScript Functions in Real-Time Applications

advanced

airy
bessel
bessel_h
bessel_i
bessel_j
bessel_k
bessel_y
besselchk
beta
beta_incomplete
beta_ln
elliptic_j
elliptic_int
erf
erfc
erfc_inv
erfc_scale
erf_inv
exp_int
gamma
gamma_incomplete
gamma_ln
legendre
psi
sphbessel_h
sphbessel_j
sphbessel_y

approximation

fit
interpolate1d
interpolate2d
interpolateft
lsqfit
rat
spline
splinefit

audio

beep
fread_audio
sound
soundscaled
wavplay
wavread
wavrecord
wavwrite

basic

abs
accumproducts
accumsums
accumtrapint
angle
cart_to_polar
cart_to_sphere
ceil
conjugate
evalfn
exp
factor
factorial
fix
floor
gcd
imag
lcm
log
log2
log10
max
min
mod
nextpowerof2
peakfcn1d
polar_to_cart
powerof2
powerofreal
prod
real
reallog
rem
reorderdim
reorderdiminv
rotateplane
round
sign
sort
sortconjugate
sortrows
sphere_to_cart
sqrt
sqrtofreal
sum

bitwise

bitand
bitget
bitnot
bitor
bitset
bitshift
bitxor

boolean

all
and
any
logical
not
or
xor

commands

clear
clout
diary
edit
home
keyboard
pause
quit
waitforbuttonpress

comparison

eq
ge
gt
is_equal
is_equalnan
le
lt
ne

constants

eps
inf
maxfloat
maxfloatint
maxnamelen
minfloat
nan
pi

daq

aich
aiwf
aoch
aowf
dioread
diowrite

dsp

filter design

angle
convmx
iir_besselzpk
fir_fs
fir_gauss
fir_gaussps
fir_interp
fir_lsq
fir_pm
fir_pmord
fir_rcos
fir_remez
fir_remezord
fir_sgsmooth
fir_win
freq_space
freqsd
freqzd
grpdelay
iir_bessel
iir_butter
iir_butterord
iir_butterzpk
iir_cheby1
iir_cheby1ord
iir_cheby1zpk
iir_cheby2
iir_cheby2ord
iir_cheby2zpk
iir_elliptic
iir_ellipticord
iir_ellipticzpk
iir_maxflat
iir_yulewalker
impzd
kaiserwinord
lp_to_bp
lp_to_bs
lp_to_hp
lp_to_lp
phasedelay
phasezd
stepzd
unwrapphase
zerophase
zplane

filter implementation

bilinear
conv
conv2d
convcirc
deconv
filter
filter_2d
filter_fft
filter_impulse
filter_lattice
filter_median
filter_sg
filter_sos
filter_zerophase
filteric
quantdecode
quantencode

linear systems

eqtflen
filternorm
lattice_to_tf
poly_scale
poly_stable
residuezd
sos_to_ss
sos_to_tf
sos_to_zpk
ss_to_sos
ss_to_tf
ss_to_zpk
tf_to_lattice
tf_to_sos
tf_to_ss
tf_to_zpk
tf_to_zpk_eqlen
zpk_to_sos
zpk_to_ss
zpk_to_tf

modeling and prediction

ac_to_poly
ac_to_rc
ac_to_rcschur
ar_burg
ar_covar
ar_mcovar
ar_yule
dimpulse
dlsim
dstep
iir_steigmcbride
invfreqsd
invfreqzd
is_to_rc
lar_to_rc
levinson
lpc
lsf_to_poly
poly_to_ac
poly_to_lsf
poly_to_rc
prony
rc_to_ac
rc_to_is
rc_to_lar
rc_to_poly
revlevinson

resampling

decimate
downsample
interpolate
interpolate1d
resample
resample_fir
spline
upsample

spectral analysis

buffermx
ccepstrum
coherence
coherence_ms
corrcoeff
corrmx
covarmx
crosscorr
crosscorr2d
crosscovar
crosspsd
crosssd
iccepstrum
minrepseq
psd
psd_burg
psd_covar
pspec_eign
psd_mcovar
psd_periodogram
psd_welch
psd_yule
pspec_music
rcepstrum
root_eign
root_music
spectrogram
tf_estimate
tf_estimateplot

transforms

bitreverseorder
chirpzt
dct
dftmx
digitreverseorder
dst
fft
fft2d
fftshift
goertzel
hilbert
ichirpzt
idct
idst
ifft
ifft_shift
ifft2d

waveform generation

chirp
dirichlet
gaussmonopulse
gausspulse
gensignal
linramp
logramp
pulsetrain
realifft
realifft2d
rectpulse
sawtooth
sinc
square
stepsignal
tripulse
vco

windows

win_bartlett
win_bartletthann
win_blackman
win_blackmanharris
win_bohman
win_cheby
win_flattop
win_gauss
win_hamming
win_hann
win_hann2
win_kaiser
win_nuttall
win_parzen
win_rect
win_taylor
win_triangular
win_tukey

geometry

contours
convexhull
cylinder
delaunay
ellipsoid
intrp2d_uneven
is_inpolygon
meshgrid2d
polygonarea
rectintarea
sphere
treelayout
triangsearch
voronoi

ignored

findobj
gco

integration

polyintegral
quada
quada_double
quada_nc8
quada_triple
quadn_trap

libraries

lib_call
lib_funclist
lib_isloaded
lib_load
lib_unload

linalgebra

balance
blockdiag
cat
cctranspose
chol
circularshift
companion
cond
condeign
condestimate
condrecip
deflate
det
diag
eig
eigsort
expmx
expmx_eign
expmx_pade
expmx_taylor
findnz
funmx
gsvd
hconcatmx
hessenberg
linearsolve
logmx
lu
mirror
mirrorh
mirrorv
norm
normestimate
null
numdims
numelements
numnz
nz
orth
pinv
polyvalmx
powermx
qr
qz
rank
reshapemx
rotate90
rref
schur
size
sqrtmx
subspaceangle
svd
trace
transpose
tril
triu
updatechol
vconcatmx

matrix

eye
false
hadamard
hankel
hilbertmx
invhilbertmx
magic
ones
pascal
peakfcn2d
perms
primes
repeatmx
rosser
toeplitz
true
vandermonde
wilkinson
zeros

matrixops

inv
leftdiv
leftdivmx
minus
minus1
multmx
plus
plus1
power
rightdiv
rightdivmx
times

membership

datatype
exist
is_char
is_dir
is_empty
is_finite
is_global
is_ieee
is_inf
is_keyword
is_letter
is_logical
is_member
is_membermx
is_nan
is_numeric
is_prime
is_real
is_scalar
is_sorted
is_space
is_string
is_validvarname

ode

ode_adams
ode_bdf15
ode_bdf23
ode_radau5
ode_rk23
ode_rk45
ode_rosen
odepset
ODE Solver Parameters

optimization

fmin_bracket
fmin_nonlin
fmin_nonlincon
fmin_lp
fmin_pattern
fmin_qp

pde

pde_elliptic

plots

MathScript Plot Attributes

Line Attributes
Plot Area Attributes
Plot Window Attributes
Text Attributes

area
axes
axis
bar
bar3d
bar3dhoriz
barhoriz
clfig
clgraph
close
colormap
colormapplot
contour
contour3d
contouris
datescale
deferdraw
errorbar
feather
figure
fill
get
plotcoord
grid
plottext
hold
image
imagescaled
legend
line
loglog
mesh
meshcontour
pareto
pie
plot
plot3d
plotf_3d
plotf
plotf_contour
plotf_contouris
plotf_mesh
plotf_meshcontour
plotf_polar
plotf_surf
plotf_surfcontour
plotmatrix
plotyy
polar
quiver
ref_plotarea
ref_plotwin
scatter
scatter3d
selectdata
semilog_x
semilog_y
set
showplot
stairs
stem
stem3d
stripplot
subplot
surface
surfacecontour
surfacenorm
text
title
titles
treeplot
view
waterfall
xlabel
xlabels
xlimit
ylabel
ylabels
ylimit
zlabel
zlimit
zoom

polynomials

conv
deconv
poly
polyderivative
polyeign
polyfit
polyintegral
polyval
poly_pw
poly_pwhermite
residue
roots

programming

break
case
continue
end
else
elseif
for
if
otherwise
return
switch
while

rt

rt_debugoutput
rt_loadsend
rt_loguserevent
rt_starttrace
rt_stopsave
rt_stopsend
rt_tickcount
rt_wait
rt_waitmultiple

sets

sets_diff
sets_intersect
sets_union
sets_unique
sets_xor

statistics

corrcoeff
covarmx
crosscorr
detrend
halton
histogram
histogramc
mean
median
nchoosek
rand
randnormal
random

Statistical Distributions for the Random Function

randpermutation
richtmeyer
std
var

string

base_to_dec
bin_to_dec
blanks
char
deblank
dec_to_base
dec_to_bin
dec_to_hex
eval
evalscript
findstr
hex_to_dec
hex_to_num
int_to_str
lowercase
mx_to_str
num_to_str
regex
regex_convert
regex_i
regex_replace
sprintf
sscanf
str_to_double
str_to_mx
str_to_num
str_to_range
strcmp
strcmp_i
strcmp_n
strcmp_ni
strconcat
strfindall
strjustify
strmatchall
strread
strreplace
strtoken
strtrimwhite
strvectorize
strvconcat
uppercase

support

addpath
arginchk
arginnum
argoutchk
argoutnum
cd
complex
duplicate
delete
dir
disp
display
dos
double
end
error
exit
fclose
feof
fgetline
fgets
fileinfo
flatindex
fopen
format
fprintf
fread
fread_bmp
fread_csv
fread_delimited
fread_image
fread_xls
frewind
fscanf
fseek
fwrite
fwrite_csv
fwrite_delimited
fwrite_image
fwrite_xls
getcurrentscript
getfileproperty
global
help
ind_to_sub
input
int16
int32
int64
int8
is_student
labviewroot
lasterror
length
load
loaddialog
lookfor
ls
path
pathdefault
pathfwrite
pathgetsubset
pathremove
pathseparator
persistent
pwd
rgb_to_grayscale
run
save
setfileproperty
single
str_to_path
system
tempdir
tempname
textread
type
uint16
uint32
uint64
uint8
userpath
ver
warning
what
which
who
who_all

time

calendar
clock
date
date_to_num
date_to_str
date_to_vector
now
numdays
weekday

timing

cputime
etime
timerstart
timerstop

trigonometric

acos
acosh
acot
acoth
acsc
acsch
asec
asech
asin
asinh
atan
atan2
atanh
cos
cosh
cot
coth
csc
csch
sec
sech
sin
sinc
sinh
tan
tanh

vector

cross
curl
difference
divergence
dlaplacian
dot
gradient
kron

zerofinder

fsolve_zero
fsolve_zeros


 

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