This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

SetInputPortDimensions

Set the dimensions of the signals accepted by an input port

Required

No

Languages

MATLAB

Syntax

SetInputPortDimensions(s, port, dimsInfo)

Arguments

s

Instance of Simulink.MSFcnRunTimeBlock class representing the Level-2 MATLAB S-Function block.

port

Integer value specifying index of port to be set.

dimsInfo

Array that specifies the signal dimensions supported by the port, e.g., [5] for a 5-element vector signal or [3 3] for a 3-by-3 matrix signal.

Description

The Simulink® engine calls this method during dimension propagation with candidate dimensions dimsInfo for port.

A Level-2 MATLAB S-function sets the input port dimensions using the line

s.InputPort(port).Dimensions = dimsInfo;

This method is only valid for simulation.

Note

This method can set the dimensions of any other input or output port whose dimensions derive from the dimensions of port.

By default, the engine calls this method only if it can fully determine the dimensionality of port from the port to which it is connected.

The engine calls this method until all input ports with inherited dimensions have their dimensions specified.

Introduced in R2012b