Why i receive this warning : Warning: Variable 'needed' exists in base workspace or data dictionary but not in the model's source workspace.
21 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
djedoui Nassim
il 10 Dic 2018
Modificato: djedoui Nassim
il 11 Dic 2018
I want to run an optimization problem using GA, the optimization will be runned for multiple cases of study using For statement.
An objective function (myfitness) is written for the fitness functions and this function will run a Simulink model using a command line as follow
options=simset('SrcWorkspace','current''DstWorkspace','current');
sim('untitled2.slx',[],options)
The whole program is runned by a Main script in which another function 'function 2' is called to define some data and variables to be used in the fitness function (myfitness).
When the main script is runned, i got this warning and the simulation stops
' Warning: Variable 'needed' exists in base workspace or data dictionary but not in the model's source workspace. '
The variable 'needed' is obtained by calling the 'function 2' , i understand that Simulink don’t have the access to this variable , but i can see that this variable is on the workspace.
What is the solution please and what is the cause of the problem.
Best
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!