www.gusucode.com > MATLAB雷达工具箱 > MATLAB雷达工具箱/MATLAB雷达工具箱/dbtlinkR1-3/util/getinvar.m

    %GETINVAR Gets the input variables "inVar1", "inVar2" etc... from the previous Simulink block.
%
%--------
%Synopsis:
%  paramNo = getparamno
%
%Description:
%  This is a MATLAB script that gets the input variable "inVar1", "inVar2" 
%  etc... from the previous Simulink block. 
%  It works for arbitrary input port widths. The inputs are put in the variables
%  "inVar1", "inVar2" etc. 
%  The number input of variables is determined from the number of elements
%  in the variable "u".
%
%Input:
%  u (IntScalarT): The input parameter to the Simulink block
%
%Output:
%  inVar1 (Arbitrary data type): 
%  
%Global Variables:
%  ['pipeVar',num2str(u)] (Arbitrary data type): 
% 
%--------
%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:


%   *  DBT, A Matlab Toolbox for Radar Signal Processing  *
% (c) FOA 1994-99. See the file dbtright.m for copyright notice.
%
%  Start        : 991106 Svante Bj鰎klund (svabj).
%  Latest change: $Date: 2000/10/01 11:52:48 $ $Author: svabj $.
%  $Revision: 1.8 $
% *****************************************************************************

  %paramNoIn1 = u;
  %eval(['global pipeVar',num2str(paramNoIn1)])
  %eval(['inVar1 = pipeVar',num2str(paramNoIn1),';'])
  
  %noInputs = length(u);
  %for i=1:noInputs
  %  paramNoIn(i) = u(i);
  %  eval(['global pipeVar',num2str(paramNoIn(i))])
  %  eval(['inVar',num2str(i),' = pipeVar',num2str(paramNoIn(i)),';'])
  %end%for i
 
  noInputs = length(u);
  for i=1:noInputs
    %paramNoIn1 = u(i);
    eval(['global pipeVar',num2str(u(i))])
    eval(['inVar',num2str(i),' = pipeVar',num2str(u(i)),';'])
  end%for i