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

48 ビュー (過去 30 日間)
sara yazdani
sara yazdani 2017 年 7 月 19 日
コメント済み: Lazar Dulovic 2022 年 6 月 30 日
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.
  16 件のコメント
Walter Roberson
Walter Roberson 2021 年 5 月 13 日
set_param('YourModelNameGoesHere', 'StopFcn', '')
then save your model.
Lazar Dulovic
Lazar Dulovic 2022 年 6 月 30 日
As Swarooph said, problem is in the code, write it in M file and check it line by line.

サインインしてコメントする。

回答 (1 件)

Scout Patel
Scout Patel 2021 年 3 月 31 日
  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:"

製品

Community Treasure Hunt

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

Start Hunting!

Translated by