- Please set the size on all ports for which the error is reported (don't forget to subtract one from the reported numbers!).
- Sometimes, Shortening the model file name fixed this issue in at least one case. (The name had been over 68 characters.) Error might possibly be something to do with the filename being too long, so MATLAB was reading the first so many characters and getting multiple files that differ in name only after the cutoff confused.
Error in default port dimensions function of S-function
- Error in default port dimensions function of S-function 'MPC_Inv_IM_R1/Predictive Controller'. This function does not fully set the dimensions of output port 2