📄 doaspc2sigamp.m
字号:
function sigOut = doaspc2sigamp(spect)%DOASPC2SIG Converts a DOA spectrum (DoaSpecT) to a (amplitude) radar signal (RxRadarSigT).%%--------%Synopsis:% sigOut = doaspc2sigamp(spect)%%Description:% Converts one or more directional spectra (DoaSpecT) to a radar signal % (RxRadarSigT). The amplitude spectra is stored in the output signal.% This is actually not possible and allowed. The result is not a real radar % signal.% The purpose with this function is to make it possible to plot directional % spectra with the plotting functions for radar signals.%% NOTE: A "radar" signal created with this function can only be used for % plotting, not for further processing.%%Output and Input:% sigOut (RxRadarSigT): The output radar signal.% spect (DoaSpecT): Input DOA-spectrum, from for example "doaspc1".% spect (CellArrayT of DoaSpecT): Input DOA-spectrum, from for example % "doaspc1". The different spectra are stored in different CPIs % (trials, subscript 5) in the radar signal. Not implemented.%%--------%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.)%%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:% doaspc2sig% * DBT, A Matlab Toolbox for Radar Signal Processing *% (c) FOA 1994-2000. See the file dbtright.m for copyright notice.%% Start : 980701 Svante Bj鰎klund (svabj).% Latest change: $Date: 2000/10/16 15:20:46 $ $Author: svabj $.% $Revision: 1.2 $% *****************************************************************************if (iscell(spect)) % "spect" is a cell array of DoaSpecT, which will be put into an % "RxRadarSigT". % The code in this if-branch is not finnished. sizeSpec = sizem(spect.specSmpl); % This must be an error. Must index % the cell array! %sigOut = RxRadarSigT(zeros([1, sizeSpec(2), sizeSpec(1), sizeSpec(4), ... % sizeSpec(5)]),{defant,defwave}); sigOut = RxRadarSigT; sigOut.signals = zeros([1, sizeSpec(2), sizeSpec(1), sizeSpec(4), ... sizeSpec(5)]); noSpc = length(spect) for spcLoop = 1:noSpc spect1 = spec{1}; sizeSpec = sizem(spect1.specSmpl); if (sizeSpec(5) ~= 1) error('DBT-Error: Only one trial is allowed.') end%if trialIx = 1; for phiIx = 1:sizeSpec(4) spect1 = spec{spcLoop}; testversion(spect1) sigOut.signals(1,:,:,phiIx,spcLoop) ... = sqrt(abs(spect1.specSmpl(:,:, phiIx,trialIx).')); % The "abs" should not be necessary because the input spectrum % should be real. end%for phiIx end%for for spcLoopelse testversion(spect) sizeSpec = sizem(spect.specSmpl); old = 0; if (old) sigOut.dataType = 'RxRadarSigT'; sigOut.signals = zeros([1, sizeSpec(2), sizeSpec(1), sizeSpec(4), ... sizeSpec(5)]); else antenna = defant; waveform = defwave(1,1,1,1,1); sigOut = RxRadarSigT(zeros([1, sizeSpec(2), sizeSpec(1), sizeSpec(4), ... sizeSpec(5)]),{antenna, waveform}); end%if for trialIx = 1:sizeSpec(5) for phiIx = 1:sizeSpec(4) sigOut.signals(1,:,:,phiIx,trialIx) = spect.specSmpl(:,:,phiIx,trialIx).'; end%for phiIx end%for trialIx %sigOut.antenna = antenna; %sigOut.waveform = waveform;end%if%endfunc doaspc2sigfunction testversion(spect) if (spect.version < 4) error(['DBT-Error: Too old version of input parameter "estDirSpec". ',... 'Probably because a definition of the "DoaSpecT" variable ',... 'somewhere else than in function "DoaSpecT".']) end%if%endfunc testversion
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -