📄 ecorrm.m
字号:
% ... = There can be more parameters. They are explained under respective% metod or choice.%%Examples:% ant = defant('isotropULA',[K,D,lambda]);% sig = compsim2(ant, 1, T, tgtModel, [theta, phi, SNR, alpha, dalpha, ...% dist, ones(size(theta,1))], 'rndn', eye(K));% R = ecorrm(sig,'spatsmooth',[],[],10);% splot2(sdoaspc('music',R1,[],MMu))%%Algoritm:%%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.% [2]: Krim H., Viberg M.:"Two Decades of Array Signal Processing Research",% IEEE Signal Processing Magazine, July 1996, pp. 67-94.% [3]: Carlsson B.D.: "Covariance Estimation Errors and Diagonal Loading% in Adaptive Arrays", IEEE Trans. AES-24, No. 4, July 1988, pp. 397-401.% [4]: Ganz M.W., Moses R.L., Wilson S.L.: "Convergence of the SMI and the% Diagonally Loaded SMI Algorithms with Weak Interference", IEEE Trans.% AP-38, No. 3, March 1990, pp. 394-399.% [5]: Nickel U.: "Comparison of some criteria to determine the dimension% of the signal subspace for small sample size", Report No. 457, FGAN-FFM% 1996, Germany, p. 13.%%See Also:% basecorrm, modcorrmkernel% * DBT, A Matlab Toolbox for Radar Signal Processing *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.% Test text \alpha = \beta/2%% Start : 960924 Svante Bj鰎klund (svabj).% Latest change: $Date: 2000/10/16 15:20:50 $ $Author: svabj $.% $Revision: 1.39 $% *****************************************************************************%disp('ecorrm')% ----------------------------------------------------------------------- %% Handle input parameters% ----------------------------------------------------------------------- %if (nargin < 1) error('DBT-Error: To few input parameters.')end% ****************** Add missing input parameters ******************if (nargin < 2) method = [];endif (nargin < 3) rangeIx = [];endif (nargin < 4) cpiIx = [];endif (nargin < 5) in5 = [];endif (nargin < 6) in6 = [];endif (nargin < 7) in7 = [];end% ****************** Default values ******************if isempty(method) method = 'ml';end%ifif isempty(rangeIx) rangeIx = 1;end%ifif isempty(cpiIx) cpiIx = 1;end%if%fprintf('rangeIx=%d, cpiIx=%d\n',rangeIx, cpiIx);% ****************** Error check input parameters ******************chkdtype(inData, 'RxCompSigT', 'RxRadarSigT', 'RxCorrMatT')chkdtype(method, 'StringT')% ----------------------------------------------------------------------- %% Preparation before the loops.% ----------------------------------------------------------------------- %% ****************** Create output variable if necessary. ******************if (strcmp(inData.dataType,'RxCompSigT') | ... strcmp(inData.dataType,'RxRadarSigT')) sizeSig = sigsize(inData,[],'n'); noChan = sizeSig(3); Rout = RxCorrMatT(zeros([noChan, noChan,length(rangeIx),1,length(cpiIx)]),... [], inData); sigField = inData.signals; ant = inData.antenna; % Where is this used?elseif (strcmp(inData.dataType,'RxCorrMatT')) if (inData.version < 4) %Convert to version 4. error('DBT-Error: Too old version of input parameter "inData".') else Rout = inData; % Copy output variable. end%ifelse error('DBT-Error: Illegal datatype of input parameter "inData".')end%if% ----------------------------------------------------------------------- %% Loops for several range gates and cpis.% ----------------------------------------------------------------------- %% ****************** Loops. ******************changeAntFlag = 0;for cpiLoop = 1:length(cpiIx)for rangeLoop = 1:length(rangeIx)% ----------------------------------------------------------------------- %% Get a base estimate of the correlation matrix% ----------------------------------------------------------------------- %if (strcmp(inData.dataType,'RxCompSigT') | ... strcmp(inData.dataType,'RxRadarSigT')) X = (getm(sigField, ':',rangeIx(rangeLoop),':',1,cpiIx(cpiLoop))).'; L = size(X,2); Rxx = 1/L * X*X'; % Maximum Likelihood estimate %Should more fields be copied? All fields but "signals"? YES! %Rout = signals; %Rout.signals = []; % Would be better to remove the field. %Rout.dataType = 'RxCorrMatT'; %Rout.version = 3; %Rout.corrMat = Rxx; Rout.noSamples = L; % This assignment is not necessary to do in each loop.elseif (strcmp(inData.dataType,'RxCorrMatT')) Rxx = inData.corrMat(:,:,rangeLoop, 1, cpiLoop); % Pick out fields from input parameters. elseif ~chkdtyph(inData,'CxMatrixT') % This choice can not be used yet. %disp('User selected samples as input.') error(['DBT-Error: The implementation is not finnished for this',... ' data type of input parameter "inData"']) if (0) L = size(X,2); Rxx = 1/L * X*X'; % Maximum Likelihood estimate % ****************** Create an output variable. ****************** % This should be done by the function "RxCorrMatT"! Rout.dataType = 'RxCorrMatT'; Rout.version = 3; Rout.corrMat = Rxx; Rout.antenna = ant; % We do not know the antenna definition. Rout.noSamples = L; % Here we can not copy any extra fields from a RxRadarSigT signal, % since we have no RxRadarSigT signal. % Use the contructor "RxCorrMatT" instead! end%if (0)else error('DBT-Error: Illegal datatype of input parameter "inData".')end%if% ----------------------------------------------------------------------- %% Methods for the modification of the estimate.% ----------------------------------------------------------------------- %[Rxx, T] = modcorrmkernel(Rxx, method, in5, in6, in7);changeAntFlag = ~isempty(T);% ----------------------------------------------------------------------- %% Return data.% ----------------------------------------------------------------------- %infoStr = sprintf('ecorrm: cpiLoop = %d(%d), rangeLoop = %d(%d)\r',cpiLoop, ... length(cpiIx), rangeLoop,length(rangeIx));dbtinfo(infoStr,1);%if (size(Rout.corrMat,1) ~= size(Rxx,1)) % It is assumed that the method % has changes the size already in the first execution of the loops.if (changeAntFlag & (rangeLoop == 1) & (cpiLoop == 1)) Rout.corrMat = zeros(size(Rxx,1),size(Rxx,2), size(Rout.corrMat,3),... size(Rout.corrMat,4), size(Rout.corrMat,5), size(Rout.corrMat,6), ... size(Rout.corrMat,7)); % If the method has changed the size of the correlation matrix, % change the size of "Rout.corrMat". Rout = setspatrans(Rout,T);end%ifRout.corrMat(:,:,rangeLoop, 1, cpiLoop) = Rxx;end%for rangeLoopend%for cpiLoopdbtinfo(''); %New line.Rout.ranIx = rangeIx;Rout.cpiIx = cpiIx; % How to interpret these fields and input parameters when reducing % the data size more than once?%endfunction ecorrm
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -