| 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 ssSetNumOutputPorts(SimStruct *S, int_T nOutputPorts)
SimStruct representing an S-Function block.
Number of output 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 output ports to a nonnegative integer. Invoke the function using
if (!ssSetNumOutputPorts(S,nOutputPorts)) return;
where ssSetNumOutputPorts returns 0 if nOutputPorts is negative or an error occurs while creating the ports. When this occurs, and you return out of your S-function, the Simulink engine displays an error message.
C, C++
See the S-function matlabroot/toolbox/simulink/simdemos/simfeatures/src/sfun_port_constant.c used in sfcndemo_port_constant.mdl.
ssSetInputPortWidth, ssSetNumInputPorts
![]() | ssSetNumNonsampledZCs | ssSetNumPWork | ![]() |

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 |