This function does not fully set the dimensions of output port [x]

3 views (last 30 days)
I have a model incorporating a stateflow system. All data that the stateflow system has anything to do with is single values, that is, 1X1. In the process of building the model, I realized that one of the outputs from the stateflow system (port 3 in this case) was redundant. I removed the variable from the stateflow code and deleted the output. The model ran fine before I did this, but now I get "Error in default port dimensions function of S-function '[stateflow chart]'. This function does not fully set the dimensions of output port 3".
If I move the ports around, I get the same error with a number of variables and ports. Which port or variable gets the error seems to be nearly random, although earlier port numbers seem to be preferred. So far, the error is exclusive to output ports.
I have tried specifying variable "size" in the model explorer. If I specify the size of the variable at output 3 as 1, a "compiled size" of 1 shows up in the model explorer, but I still get the same error (still for port 3). If I try setting the corresponding input to size 1 in the same way, I get:
"Undefined function or variable 'obj'. The first assignment to a local variable determines its class."
What does this error mean, and how can I fix it?

Answers (0)

Categories

Find more on Simulink Functions in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!