📄 doaspect.m
字号:
function spectOut = DoaSpecT(specSmpl, doaPos, spectrumType, rangeIx, extraIx, cpiIx)%DOASPECT Constructor for DOA spectra.%%--------%Synopsis:% spectOut = DoaSpecT(specSmpl, doaPos, spectrumType)%%Description:% Constructor for DOA spectra, i.e. the data type "DoaSpecT".% More information on this data type can be found in [1].%%Output and Input:% specSmpl ():% doaPos ():% spectrumType ():%%%--------%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.%%Examples:%%Software Quality:% (About what is done to ascertain software quality. What tests are done.)%%Known Bugs:%%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:% doaspc1% * DBT, A Matlab Toolbox for Radar Signal Processing *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%% Start : 981113 Svante Bj鰎klund (svabj).% Latest change: $Date: 2000/10/16 15:19:54 $ $Author: svabj $.% $Revision: 1.5 $% *****************************************************************************% The structure of this function is prepared for using MATLAB's classes.if (nargin == 0) spectOut = basedef;elseif isa(specSmpl,'DoaSpecT') spectOut = specSmpl;else if (nargin < 2) dbterror('To few input parameters.') end % ****************** Add missing input parameters ****************** arginNo=3; if (nargin < arginNo) spectrumType = []; end arginNo = arginNo +1; if (nargin < arginNo) rangeIx = []; end arginNo = arginNo +1; if (nargin < arginNo) extraIx = []; end arginNo = arginNo +1; if (nargin < arginNo) cpiIx = []; end arginNo = arginNo +1; % ****************** Default values ****************** if isempty(spectrumType) spectrumType = 'powerSpectrum'; end%if if isempty(rangeIx) rangeIx = 1; end%if if isempty(extraIx) extraIx = 1; end%if if isempty(cpiIx) cpiIx = 1; end%if % *********** Pick out some more fields from input parameters. *********** % ****************** Error check input parameters ****************** %chkdtype(specSmpl, 'CxMatrixT') chkdtype(doaPos, 'Vector of DoaT') chkdtype(rangeIx, 'IndexT') chkdtype(extraIx, 'IndexT') chkdtype(cpiIx, 'IndexT') % ************* Base definition. ************* spectOut = basedef; % ************* Assign values. ************* spectOut.specSmpl = specSmpl; spectOut.doaPos = doaPos; spectOut.spectrumType = spectrumType; spectOut.ranIx = rangeIx; spectOut.extraIx = extraIx; spectOut.cpiIx = cpiIx;end%if%endfunction DoaSpecTfunction spectOut = basedef spectOut.dataType = 'DoaSpecT'; spectOut.version = 4; spectOut.specSmpl = []; spectOut.doaPos = []; spectOut.spectrumType = []; spectOut.ranIx = []; spectOut.extraIx = []; spectOut.cpiIx = []; %parent = SpecT(...) %spectOut = class(spectOut,'DoaSpecT',parent); % Inheritance from class "SigCorrMatT".%endfunction basedef
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -