MATLAB: Can anyone help me with the water level tank (sltank) example available on Matlab

s-function

What does sys=[0 0 0 2 0 0] mean? it is available in flag==0 S-function code for the water level tank example available by writing in the matlab command: (sltanlk)

Best Answer

When the setup phase is run, a vector of sizes and flags must be returned. http://www.mathworks.com/help/toolbox/simulink/sfg/f7-67615.html#f7-13642
If we count the fields shown there from the top, a 2 in the 4th field would correspond to saying that the S-block has 2 inputs.