Home > m > gui > gltpda > g_cleaninput.m

g_cleaninput

PURPOSE ^

This is the automatic function wrapper

SYNOPSIS ^

function g_cleaninput(block)

DESCRIPTION ^

             This is the automatic function wrapper
 =================================================================
 ================ level-2 M file S-function ======================
 =================================================================
 To remove an object from the list of the inputs.

  $Id: g_cleaninput.m,v 1.1 2008/04/10 15:27:52 nicola Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function g_cleaninput(block)
0002 
0003 %             This is the automatic function wrapper
0004 % =================================================================
0005 % ================ level-2 M file S-function ======================
0006 % =================================================================
0007 % To remove an object from the list of the inputs.
0008 %
0009 %  $Id: g_cleaninput.m,v 1.1 2008/04/10 15:27:52 nicola Exp $
0010 
0011 setup(block);
0012   
0013 %%
0014 function setup(block)
0015 
0016   %% Register dialog parameter: none, because they're retrieved directly
0017   %% from the memory. This will prevent the user to modify the parameters
0018   %% outside the proper parameters panel:
0019   block.NumDialogPrms = 0;
0020 
0021   %% Register number of input and output ports
0022   block.NumInputPorts  = 2;
0023   block.NumOutputPorts = 1;
0024 
0025   %% Setup functional port properties to dynamically inherited.
0026   block.SetPreCompInpPortInfoToDynamic;
0027   block.SetPreCompOutPortInfoToDynamic;
0028   
0029   block.InputPort(1).DirectFeedthrough = true;
0030   block.InputPort(1).DatatypeID = 0;
0031   block.InputPort(1).Complexity = 0;
0032 % block.InputPort(1).Dimensions = 2;
0033   block.InputPort(2).DirectFeedthrough = true;
0034   block.InputPort(2).DatatypeID = 0;
0035   block.InputPort(2).Complexity = 0;
0036 % block.InputPort(2).Dimensions = 2;
0037   block.OutputPort(1).DatatypeID = 0;
0038   block.OutputPort(1).Complexity = 0;
0039 % block.OutputPort(1).Dimensions = 1;
0040   block.SampleTimes = [0 0];
0041   block.SetAccelRunOnTLC(false);
0042  
0043   %% Register methods
0044 %   block.RegBlockMethod('SetInputPortSamplingMode',@SetInpPortFrameData);
0045   block.RegBlockMethod('SetInputPortDimensions',  @SetInpPortDims);
0046   block.RegBlockMethod('SetOutputPortDimensions', @SetOutPortDims);
0047   block.RegBlockMethod('Outputs',                 @Outputs);
0048   
0049 %   function SetInpPortFrameData(block, idx, fd)
0050 %   block.InputPort(1).SamplingMode = fd;
0051 %   block.OutputPort(1).SamplingMode = fd;
0052 
0053   function SetInpPortDims(block, idx, di)
0054   block.InputPort(idx).Dimensions = di;
0055 
0056   function SetOutPortDims(block, idx, di)
0057   block.OutputPort(idx).Dimensions = di;
0058 
0059 %%
0060 function Outputs(block)
0061     global LTPDAinvar
0062     
0063     LTPDAinvar{block.InputPort(2).Data,1} = [];
0064     block.OutputPort(1).Data = block.InputPort(1).Data;
0065 
0066 %endfunction
0067

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003