How to solve the 'StopFcn' error when the cause is "Vectors must be the same length."

24 views (last 30 days)
I have got a simulation file for a grid-tie inverter, which I am going to leave its image below. When I run the simulation, I receive the following error:
Error evaluating 'StopFcn' callback of block_diagram 'DC2ACGRID2'.
Caused by:
Vectors must be the same length.
I cannot figure out what vectors are causing this trouble. Any help is very much appreciated.
  17 Comments
Sudhir
Sudhir on 14 Dec 2024
Moved: Walter Roberson on 17 Dec 2025 at 19:55
Error evaluating 'StopFcn' callback of block_diagram 'StateflowOnramp'. Callback string is 'learning.simulink.modelCallbacks.stopFunction(gcs);'
Caused by:
  • Invalid Simulink object handle
how to fix this issue ?

Sign in to comment.

Answers (1)

Scout Patel
Scout Patel on 31 Mar 2021
  1. Go to the "MODELING" tab on the simulink window.
  2. In the Center click on "Model Settings".
  3. Under Data Import/Export UNCHECK the box next to: "Single Simulation output:"
  3 Comments

Sign in to comment.

Categories

Find more on Event Functions in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!