error in default port dimension function of S-function while running in simulink

24 views (last 30 days)
while running the differential equations i am getting the above error

Answers (1)

Pankhuri Kasliwal
Pankhuri Kasliwal on 25 Nov 2020
Hello,
This issue is conceptually similar to an algebraic loop, but instead of occurring for the value of the data, it is occurring for the dimension of the data. As a possible workaround, go into the Port and Data Manager and explicitly set each signal size to their appropriate values. These values will depend on the logic of your model.
Port and Data Manager can be accessed by following the instruction in the following link:
You can also,
  1. Open the MATLAB Function Block which reported the error, and select Edit Data on the Editor tab. Alternatively select the block in the Model Explorer ( CTRL+H ).
  2. Select each variable corresponding to Input and Output ports, and in the Size edit box, specify the correct dimensions. The default is -1 or 'inherited', meaning automatically determined.
  3. Steps 1 and 2 may need to be repeated for other MATLAB Function Blocks in the model if they subsequently generate similar errors now.

Categories

Find more on Schedule Model Components in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!