Matlab not able to finalise running a script for a Simulink model

5 次查看(过去 30 天)
I have currently occuring a problem with a Matlab/simulink model, which I will need to use for my project.
A Simulink model uses a Matlab script and functions for parameters calculation. In order to use Simulink model, I need to run the script.
Problem occurs when I try to run the code but never finalises that (I have waited at least half an hour). Also, I received ten (for 1-10 equal components) warnings stating:
Warning: Matching "From" for "Goto" 'WEC/no1/Goto23' not found
> In Lscript (line 128)
In the line 128, there is a command, which should start the Simulink model:
sim('WEC');
The model works fine for some other people, who have tried it in their PC and also the creator has said that everything should be correct in the sense of code and model.
Does anybody know to suggest why my Matlab might throw such messages and never finalise it?
Best wishes and thank you in advance!

回答(1 个)

Fangjun Jiang
Fangjun Jiang 2020-9-2
The warning messages are non-critical. It indicates some signals are "sent" but not used anywhere.
Might it be that computer capabilities are quite different? Open the model "WEC", reduce the simulation time and click the "Play" button manually to see if it finishes the simulation.
  5 个评论
An
An 2020-9-4
I have founf the problem, the simulation on SImulink has been set too long, I just shortened the simulation time duration. Unfortunately, commenting sim() line out is not an option because the script uses simout (to the workbase) data in calculations and otherwise is necessary to start calling this information manually.
Fangjun Jiang
Fangjun Jiang 2020-9-4
I have been saying "reduce the simulation time" twice. sim() line does not have return variable. If run manually, simout would still be created in the base workspace.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Event Functions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by