📄 ttanalogin.cpp
字号:
/* * TrueTime, Version 1.5 * Copyright (c) 2007 * Martin Ohlin, Dan Henriksson and Anton Cervin * Department of Automatic Control LTH * Lund University, Sweden */#define KERNEL_MATLAB#include "../ttkernel.h"RTsys* rtsys;#include "../analogin.cpp"#include "getrtsys.cpp"void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ){ rtsys = getrtsys(); // Get pointer to rtsys if (rtsys==NULL) { return; } // Check number and type of arguments. if (nrhs != 1) { MEX_ERROR("Wrong number of input arguments!\nUsage: ttAnalogIn(inpChan)"); return; } if (!mxIsDoubleScalar(prhs[0])) { MEX_ERROR("ttAnalogIn: inpChan must be a number"); return; } int inpChan = (int) *mxGetPr(prhs[0]); double retval = ttAnalogIn(inpChan); plhs[0] = mxCreateScalarDouble(retval);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -