Hi,
I understand that you are using the 'From' and 'GoTo' block to manipulate input data in Simulink. Here are some possible causes for the errors:
- When you run your MATLAB code before running the Simulink model, it sets up the necessary variables or configurations that the Simulink model relies on. However, if you make changes in Simulink without rerunning your MATLAB code, those dependencies might not be met, leading to errors. Better Approach: Use Simulink Callbacks for initializing data that is being used in the model.
- Blocks such as 'Gain' or 'Product' might be set to 'Matrix Multiplication' instead of 'Element-wise Multiplication' causing a mismatch in size.
You can refer to the following MathWorks documentation for Model Callback functions:
Hope it helps!