EasyManuals Logo
Home>Tektronix>Test Equipment>DPO5000 Series

Tektronix DPO5000 Series User Manual

Tektronix DPO5000 Series
1002 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #779 background imageLoading...
Page #779 background image
Oscilloscope Reference MATLAB custom functions
When compiling the project, make sure the target p latform is Any CPU. Once the D LL is compiled
(release or debug, both work), it should be placed in the appropriate directory on the instrument. Restart
the instrumen
t application, and the plugin is ready to use like any existing math operator.
MATLAB custom functions
The Custom Analysis Interface for use with MATLAB provides two options for writing MATLAB custom
analysis fu
nctions: a basic function interface and a more advanced class-based interface. Both types are
available in demo form on the instrument in C:\Users\Public\Tektronix\Plugins\Math\MATLAB.
Using the basic Function interface to create MATLAB functions
The function interface uses a simple signature: function [ output ] = exampleProcessingFunction(
rstTime, varargin ) Your function should take two inputs: a Boolean that indicates whether o r not this is
the rst time the function has been called and a variable length array. Put the results that you want the
instrument to display into the output variable of the same length as the input array.
If this is the rst time the function has been called as part of the math expression, rstTime is true. In this
case, t he varargin array consists of the record length and the sample rate:
recordLength = varargin{1};
sampleRate = varargin{2};
and the output is expected to be true:
output = true;
If you have any one time processing, such as lter creation, do this when rstTime is true. If you want
to have variables from a previous execution of the function available, you should m ark the variables
persistent. See the examples for more information. Note that persistent variables are automatically cleared
before the rst execution of the function.
If this is not the rst time the function has been called, then rstTime is false and varargin will consist of the
waveform inputs. The math expression may have one or two waveform inputs to the MATLAB function:
input1 = varargin{1};
if numel(varargin) == 2
input2 = varargin{2};
end
From here you can do any computations you want and put the results into the output. Your MATLAB
function can use any features available in MATLAB or installed toolboxes to perform its calculations.
Note that the output must have the same length as the inputs. If your output vector is shorter, zero out
the remaining points.
DSA/DPO70000D, MSO/DPO/DSA70000C, DPO7000C, and MSO/DPO5000 Series 757

Table of Contents

Other manuals for Tektronix DPO5000 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tektronix DPO5000 Series and is the answer not in the manual?

Tektronix DPO5000 Series Specifications

General IconGeneral
BrandTektronix
ModelDPO5000 Series
CategoryTest Equipment
LanguageEnglish

Related product manuals