comparison m-toolbox/m/gui/gltpda/g_cleaninput.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 function g_cleaninput(block)
2
3 % This is the automatic function wrapper
4 % =================================================================
5 % ================ level-2 M file S-function ======================
6 % =================================================================
7 % To remove an object from the list of the inputs.
8 %
9 % $Id: g_cleaninput.m,v 1.1 2008/04/10 15:27:52 nicola Exp $
10
11 setup(block);
12
13 %%
14 function setup(block)
15
16 %% Register dialog parameter: none, because they're retrieved directly
17 %% from the memory. This will prevent the user to modify the parameters
18 %% outside the proper parameters panel:
19 block.NumDialogPrms = 0;
20
21 %% Register number of input and output ports
22 block.NumInputPorts = 2;
23 block.NumOutputPorts = 1;
24
25 %% Setup functional port properties to dynamically inherited.
26 block.SetPreCompInpPortInfoToDynamic;
27 block.SetPreCompOutPortInfoToDynamic;
28
29 block.InputPort(1).DirectFeedthrough = true;
30 block.InputPort(1).DatatypeID = 0;
31 block.InputPort(1).Complexity = 0;
32 % block.InputPort(1).Dimensions = 2;
33 block.InputPort(2).DirectFeedthrough = true;
34 block.InputPort(2).DatatypeID = 0;
35 block.InputPort(2).Complexity = 0;
36 % block.InputPort(2).Dimensions = 2;
37 block.OutputPort(1).DatatypeID = 0;
38 block.OutputPort(1).Complexity = 0;
39 % block.OutputPort(1).Dimensions = 1;
40 block.SampleTimes = [0 0];
41 block.SetAccelRunOnTLC(false);
42
43 %% Register methods
44 % block.RegBlockMethod('SetInputPortSamplingMode',@SetInpPortFrameData);
45 block.RegBlockMethod('SetInputPortDimensions', @SetInpPortDims);
46 block.RegBlockMethod('SetOutputPortDimensions', @SetOutPortDims);
47 block.RegBlockMethod('Outputs', @Outputs);
48
49 % function SetInpPortFrameData(block, idx, fd)
50 % block.InputPort(1).SamplingMode = fd;
51 % block.OutputPort(1).SamplingMode = fd;
52
53 function SetInpPortDims(block, idx, di)
54 block.InputPort(idx).Dimensions = di;
55
56 function SetOutPortDims(block, idx, di)
57 block.OutputPort(idx).Dimensions = di;
58
59 %%
60 function Outputs(block)
61 global LTPDAinvar
62
63 LTPDAinvar{block.InputPort(2).Data,1} = [];
64 block.OutputPort(1).Data = block.InputPort(1).Data;
65
66 %endfunction
67