How to use the variables of a simulink model in matlab m file?

1 回表示 (過去 30 日間)
Amin Mohammed
Amin Mohammed 2015 年 5 月 4 日
0
down vote
favorite
I hope my keywords describe my situation. Basically, I'm working with SMC (Sliding Mode Control) in Simulink using simulink blocks and S Function blocks. Now, I want to use DE (Differential Evolution) algorithm, to determine the parameters of SMC that gives the best resluts. DE implemented by two m files, one of them contain a function for objective function (this need by DE), and the other one contain the rest of DE algorithm, used to running. What I did, is that, I converted one m file, to s function because it need some variables from the Simulink Model, my question is that, now I want to use the value of the objective function in the other m file (DE algorithm) to run the DE to make some iterations. Hopefully, I'm clear. I found some stuff here , but it seems, I'm looking exactly for the opposite scenario.

回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Environment Customization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by