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

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 Comment

I guess running the script so slow is not related to that warning.

Sign in to comment.

Answers (1)

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 Comments

Hello!
Thank you for your reply. I am sure that the issue is not in my computer capabilities since it has quite good parameters and is also quite new PC.
I have tried to run the script a copule of times also while the simulink model is open. There has to be some other issue. Do you know how to check the calculation process or something similar to find out what may make it that slow?
run the script without the sim() line, then open the model, reduce the simulation time and try to run a short simulation first.
thanks
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.
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.

Sign in to comment.

Categories

Find more on Simulink in Help Center and File Exchange

Products

Asked:

An
on 1 Sep 2020

Commented:

on 4 Sep 2020

Community Treasure Hunt

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

Start Hunting!