| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
boolean_T ssSetNumInputPorts(SimStruct *S, int_T nInputPorts)
SimStruct representing an S-Function block.
Number of input ports on the block represented by S. Must be a nonnegative integer.
The Boolean value true if successful. Otherwise, returns false.
Use in mdlInitializeSizes to set the number of input ports to a nonnegative integer. Invoke it using
if (!ssSetNumInputPorts(S,nInputPorts)) return;
where ssSetNumInputPorts returns false if nInputPorts is negative or an error occurs while creating the ports.
C, C++
See the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/sfun_multirate.c used in sfcndemo_sfun_multirate.mdl.
ssSetInputPortWidth, ssSetNumOutputPorts
![]() | ssSetNumDWork | ssSetNumIWork | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |