📄 sigsize.m
字号:
function signalSizeOut = sigsize(signal, dimensions, dispOpt)%SIGSIZE Prints on the screen or returns the size of a radar signal.%%--------%Synopsis:%% signalSize = sigsize(signal, dimensions, dispOpt)%%Description:% Prints on the screen or returns the size of a radar signal.%%Output and Input:% signalSize (IndexT): The sizes for the diffrerent indices of the signal.% signal (RxRadarSigT): Input radar signal.% dimensions [D](IndexT): Return the length of the dimensions specified% by this input parameter. For example, sigsize(sig,1:2) returns the number% of pulses and number of range bins as a two-element vector.% dispOpt [D](StringT): Display options.% = 'n': Don't print on screen.% = 'p': Print on screen.%%--------%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.%%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:% sigplot2, compsim4, compsim5, expsig1% *****************************************************************************% * DBT, A Matlab Toolbox for Radar Signal Processing *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%% Start : 970724 Svante Bj鰎klund (svabj).% Latest change: $Date: 2000/10/16 15:21:47 $ $Author: svabj $.% $Revision: 1.12 $% *****************************************************************************if (nargin < 1) error('DBT-Error: To few input parameters.')end%if (nargin < 2)% dispOpt = '-';%end% ****************** Add missing input parameters ******************if (nargin < 2) dimensions = [];endif (nargin < 3) dispOpt = [];end% ****************** Default values ******************if isempty(dimensions) dimensions = ':';end%ifif isempty(dispOpt) dispOpt = '-';end%if% ****************** Error check input parameters ******************chkdtype(signal, 'RxCompSigT', 'RxRadarSigT', 'RxCorrMatT')if (strcmp(signal.dataType,'RxCorrMatT')) error('DBT-Error: Not implemented for RxCorrMatT.') % This together with the "chkdtype" statement seems to be a contradiction. % Is 'RxCorrMatT' allowed?end% ----------------------------------------------------------------------- %% Do the work.% ----------------------------------------------------------------------- %XX = signal.signals;sss = sizem(XX);if ((((nargout > 0) & (dispOpt == 'p')))| ((nargout == 0) & (dispOpt ~= 'n'))) fprintf('Size of radar signal:\n') fprintf(' Pulses or doppler ch. = %d\n',sss(1)) fprintf(' Range bins = %d\n',sss(2)) fprintf(' Channels or beams = %d\n',sss(3)) fprintf(' Not used = %d\n',sss(4)) fprintf(' CPI:s = %d\n',sss(5)) fprintf(' Trials = %d\n',sss(6)) totNoElem = prod(sss); fprintf(' Total number of elements = %d, of bytes = %d.\n',totNoElem, ... 8*totNoElem)end%if% ****************** Output parameters ******************if (nargout > 0) if (isstr(dimensions) & (dimensions == ':')) signalSizeOut = sss; else signalSizeOut = sss(dimensions); end%ifend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -