Calling matlab from the instrument, Calling matlab – Teledyne LeCroy WaveRunner XI SERIES Operator’s Manual User Manual
Page 208

W
AVE
R
UNNER
X
I
S
ERIES
208
WRXi-OM-E Rev C
plication")
ExcelColumnA = 2 'Column where the data will appear in Excel
re
will s
ExcelColumnB = 3 ' Column w
utput data will appear in Excel
Next
s
can be returned to the VB
sc
pp.ActiveSheet.Cel ("ExcelRow
ell is v
o it
the
men
Calling MATLAB
Set ExcelApp = GetObject(,"Excel.Ap
ExcelApp.Visible = True
ExcelRow = 10 'Row whe the data
here the o
tart
For K = 0 To LastPoint
ExcelApp.ActiveSheet.Cells("ExcelRow + K, ExcelColumnA ") = -USD(K)
Once the data are in Excel, any Excel function
ript.
can be applied to the data. The results
For K = 0 To LastPoint
NDA(K) = ExcelA
ls
+ K, ExcelColumnB")
Next
Transferring data cell by c
ery slow, s
is better to do a block transfer.
Calling MATLAB from
Instru
t
Note: Load MATLAB version 6
you w
.5 just as
ould on any PC. Once it is loaded, open MATLAB from the
desktop, then close it again, be
ment application. This is to update the
fore you attempt to open it from the instru
registry.
MATLAB can be directly called from the instrum
gh F
dep
d o
pe. See
waveform
ent in two ways:
Using a function
F1 throu
available
loade
x The number of math traces
ends on the software options
n your oscillosco
MATLAB returns a
Specifications.
Using a parameter
MATLAB returns a
P1 through Px
parameter
In both cases, one call to MATLAB can use two
ter computing
calling MATLAB from a VBScript.
separate waveforms as input, providing much grea
power than is available by
Note: If you do not place a semicolon ";" at the end of a li
the calculated value in the
ne, MATLAB will show
result window, significantly slow
the
nostics.
ing down
processing rate. This feature is best kept for diag