⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 corrmplot.m

📁 阵列信号处理的工具箱
💻 M
字号:
function eigValsOut = corrmplot(corrMatIn, sigPart, scaleType, plotType, plotOpt, pulseIx, rangeIx, extraIx, cpiIx, trialIx)%CORRMPLOT Plots a correlation matrix.%%--------%Synopsis:%  eigValsOut = corrmplot(corrMatIn, sigPart, scaleType, plotType, plotOpt, %    pulseIx, rangeIx, extraIx, cpiIx, trialIx)%%Description:%  Plots a correlation matrix.%%Output and Input:%  corrMatIn (RxCorrMatT): Correlation matrix to plot.%  sigPart [D](StringT): What property of the correlation matrices to plot.%  scaleType [D](StringT): Scale Type for vertical axis.%    = 'lin': Linear scale.%    = 'dB': dB scale. (default)%  plotType [D](StringT):%    = 'bar': Vertical bar plot. (default)%    = 'barh': Horizontal bar plot.%    = 'bar3': 3D bar plot.%    = 'plot': Using MATLAB's "plot" function.%    = 'stem': Using MATLAB's "stem" function.%    = 'stairs': Using MATLAB's "stairs" function.%  plotOpt [D](StringT): Plot options passed on to the plotting function.%  pulseIx [D](IntScalarT): %  rangeIx [D](IntScalarT): %  extraIx [D](IntScalarT): %  cpiIx [D](IntScalarT): %  trialIx [D](IntScalarT): %%--------%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:%  basecorrm, ecorrm%   *  DBT, A Matlab Toolbox for Radar Signal Processing  *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%%  Start        : 990501 Svante Bj鰎klund (svabj).%  Latest change: $Date: 2000/10/16 15:20:16 $ $Author: svabj $.%  $Revision: 1.5 $% *****************************************************************************%function eigValsOut = corrmplot(corrMatIn, pulseIx, rangeIx, extraIx, cpiIx, trialIx, sigType, sigPart, scaleType, normType, plotType, lineSpec plotOpt, normMinLevel, normMaxLevel, plotMinLevel, plotMaxLevel, sigMinVal, sigMaxVal)% ----------------------------------------------------------------------- %% Handle input parameters% ----------------------------------------------------------------------- %if (nargin < 1)  error('DBT-Error: To few input parameters.')end% ****************** Add missing input parameters ******************arginNo=2;if (nargin < arginNo)  sigPart = [];endarginNo = arginNo +1;if (nargin < arginNo)  scaleType = [];endarginNo = arginNo +1;if (nargin < arginNo)  plotType = [];endarginNo = arginNo +1;if (nargin < arginNo)  plotOpt = [];endarginNo = arginNo +1;if (nargin < arginNo)  pulseIx = [];endarginNo = arginNo +1;if (nargin < arginNo)  rangeIx = [];endarginNo = arginNo +1;if (nargin < arginNo)  extraIx = [];endarginNo = arginNo +1;if (nargin < arginNo)  cpiIx = [];endarginNo = arginNo +1;if (nargin < arginNo)  trialIx = [];endarginNo = arginNo +1;% *************** Evalute the list extraParam of keywords  ***************% These the value of this keywords are assigned to the local variables with% the same name as the keywords. The use of keywords is to make calls to% this function simpler.% *************** Pick out some fields from input parameters. ***************% ****************** Default values ******************if isempty(sigPart)  sigPart = 'abs';end%ifif isempty(scaleType)  scaleType = 'dB';end%ifif isempty(plotType)  plotType = 'mesh';end%ifif isempty(plotOpt)  plotOpt = '';end%ifif isempty(pulseIx)  pulseIx = 1;end%ifif isempty(rangeIx)  rangeIx = 1;end%ifif isempty(extraIx)  extraIx = 1;end%ifif isempty(cpiIx)  cpiIx = 1;end%ifif isempty(trialIx)  trialIx = 1;end%if% ****************** Error check input parameters ******************chkdtype(sigPart, 'StringT')chkdtype(scaleType, 'StringT')chkdtype(plotType, 'StringT')chkdtype(pulseIx, 'IntScalarT')chkdtype(rangeIx, 'IntScalarT')chkdtype(extraIx, 'IntScalarT')chkdtype(cpiIx, 'IntScalarT')chkdtype(trialIx, 'IntScalarT')% ----------------------------------------------------------------------- %% Prepare for plotting.% ----------------------------------------------------------------------- %titleText = '';% ********** Get the right the correlation matrix **********X = corrMatIn.corrMat(:,:, rangeIx, extraIx, cpiIx);% ****************** Signal parts ******************if (strcmp(sigPart,'abs'))  X = abs(X);elseif (strcmp(sigPart,'angle'))  X = angle(X);elseif (strcmp(sigPart,'uwangle'))  X = unwrap(angle(X));elseif (strcmp(sigPart,'real'))  X = real(X);elseif (strcmp(sigPart,'imag'))  X = imag(X);else  error('DBT-Error: Invalid sigPart.')end%iftitleText = [titleText,sigPart,','];% ****************** Scale types ******************scaleTypeif (strcmp(scaleType,'lin'))  % Do nothing.  zlabelTxt = '[lin]';elseif (strcmp(scaleType,'dB'))  X = 10*log10(X+eps);  zlabelTxt = '[dB]';else  error('DBT-Error: Invalid scaleType.')end%ifxlabelTxt = 'Antenna channel';ylabelTxt = xlabelTxt;% ----------------------------------------------------------------------- %% Plotting of the eigenvalues.% ----------------------------------------------------------------------- %if strcmp(plotType,'mesh')  % 'lin' here does not mean that the y-axis  mesh(X)elseif strcmp(plotType,'surf')  surf(X)elseif strcmp(plotType,'surfl')  surfl(X)else  error('DBT-Error: Unknown plot type.')end%iftitle('Correlation matrix')zlabel(zlabelTxt)xlabel(xlabelTxt)ylabel(ylabelTxt)% ----------------------------------------------------------------------- %% Create output variable.% ----------------------------------------------------------------------- %%endfunction eigplot1

⌨️ 快捷键说明

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