%% File : sfun_cplx.tlc generated from sfun_cplx.ttlc revsion 1.1 %% $Date: 2000/07/05 12:34:59 $ %% %% Mojdeh Shakeri %% %% Copyright 1990-2000 The MathWorks, Inc. %% %% Abstract: Sfun_cplx block target file %% %implements sfun_cplx "Ada" %% Function: Outputs ========================================================== %% Abstract: %% Y = P + U %% %function Outputs(block, system) Output %% %% Comment generated code %% %% %assign pIsComplex = LibBlockParameterIsComplex(Operand) %assign uIsComplex = LibBlockInputSignalIsComplex(0) %assign yIsComplex = LibBlockOutputSignalIsComplex(0) -- s-function sfun_cplx: % %assign rollVars = ["U", "Y", "P"] %roll idx = RollRegions, lcv = RollThreshold, block, "Roller", rollVars %assign pre = LibBlockParameter(Operand, "", lcv, "%%") %assign pim = LibBlockParameter(Operand, "", lcv, "%%") %% %assign ure = LibBlockInputSignal(0,"",lcv,"%%") %assign uim = LibBlockInputSignal(0,"",lcv,"%%") %% %assign yre = LibBlockOutputSignal(0,"",lcv,"%%") %assign yim = LibBlockOutputSignal(0,"",lcv,"%%") %% %% Add real parts % := %
 + %;
      %%
      %% Add complex parts
      %if yIsComplex
	%if uIsComplex
	  %if pIsComplex
	    % := % + %;
	  %else %% p is real
	    % := %;
	  %endif %% pIsComplex
	%else
	  %% u is real, p must be complex
	  % := %;
	%endif %% uIsComplex
      %endif %% yIsComplex
      %%
    %endroll
    %%
    
%endfunction  %% Outputs

%% [EOF] sfun_cplx