adv_reset.m
来自「MATLAB是一个非常好的用于测量」· M 代码 · 共 40 行
M
40 行
function ADV_Reset( handle )%ADV_INITPERSISTBUFFER Summary of this function goes here% Detailed explanation goes hereglobal g_ADVPersistBufferglobal g_ADVPersistAmplPointsglobal g_ADVSlopeglobal g_ADVInterceptglobal g_ADVXAxisglobal g_ADVYAxisglobal g_ADVTraceFIFOglobal g_ADVTraceFIFOSizeglobal g_ADVTraceCountglobal g_ADVDisplayMode% Read a trace to get the number of pointsdata = MXA_AcquireData( handle );% Initialize the FIFOg_ADVTraceFIFO = zeros( size( data, 1 ), g_ADVTraceFIFOSize ) - 150;g_ADVTraceCount = 0;% Build the x- and y-axis vectorsg_ADVXAxis = MXA_GetXAxisArray( handle );if g_ADVDisplayMode <= 1 [yMin, yMax] = MXA_GetYScaling( handle ); g_ADVYAxis = yMax:-(yMax - yMin) / (g_ADVPersistAmplPoints - 1):yMin;else g_ADVYAxis = 1:g_ADVTraceFIFOSize;end % Create the persistence buffer initialized to zerog_ADVPersistBuffer = zeros( g_ADVPersistAmplPoints, size( data, 1 ) );% Get the scaling from the MXA[yMin, yMax] = MXA_GetYScaling( handle );% Calculate slope and intercept for determining data position in matrixg_ADVSlope = (g_ADVPersistAmplPoints - 1) / (yMin - yMax);g_ADVIntercept = g_ADVPersistAmplPoints - g_ADVSlope * yMin;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?