chkdtype.m

来自「阵列信号处理的工具箱」· M 代码 · 共 76 行

M
76
字号
function  ckdtype(variable, datatype1, datatype2, datatype3, datatype4)%CHKDTYPE Checks if the variable has any of a list of allowed datatypes.%%--------%Synopsis:%  ckdtype(variable, datatype1)%  ckdtype(variable, datatype1, datatype2)%  ckdtype(variable, datatype1, datatype2, datatype3)%  ckdtype(variable, datatype1, datatype2, datatype3, datatype4)%%Description:%  Checks if the variable has any of a list of allowed datatypes and%  if not issue an error message.%%Output and Input:%  variable (Any type): Variable to test.%  datatype1 (StringT): First allowed data type.%  datatype2 [D](StringT): Second allowed data type.%  datatype3 [D](StringT): Third allowed data type.%  datatype4 [D](StringT): Fourth allowed data type.%%--------%Notations:%  Data type names are shown in parentheses and they start with a capital%  letter and end with a capital T. Data type definitions can be found in [1]%  or by "help dbtdata".%  [D] = This parameter can be omitted and then a default value is used.%  When the [D]-input parameter is not the last used in the call, it must be%  given the value [], i.e. an empty matrix.%  ... = There can be more parameters. They are explained under respective%  metod or choice.%%Known Bugs:%  Only the following datatypes are checked:%    RecVarT, StringT.%  Vector of DoaT is partially checked.%  Variables of all other data types are allowed regardless of the "datatype1"%  input parameter.%%References:%  [1]: Bj鰎klund S.: "DBT, A MATLAB Toolbox for Radar Signal Processing.%    Reference Guide", FOA-D--9x-00xxx-408--SE, To be published.%%See Also:%  dbtdata, chkdtyph%   *  DBT, A Matlab Toolbox for Radar Signal Processing  *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%%  Start        : 951221 Svante Bj鰎klund (svabj).%  Latest change: $Date: 2000/10/16 15:20:06 $ $Author: svabj $.%  $Revision: 1.9 $% *****************************************************************************if (nargin < 3)  datatype2 = [];endif (nargin < 4)  datatype3 = [];endif (nargin < 5)  datatype4 = [];end[err1, errStr1] = chkdtyph(variable, datatype1);[err2, errStr2] = chkdtyph(variable, datatype2);[err3, errStr3] = chkdtyph(variable, datatype3);[err4, errStr4] = chkdtyph(variable, datatype4);if (err1 & err2 & err3 & err4)  error([errStr1 errStr2 errStr3 errStr4])end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?