Best way to make a matlab - simulink closed loop simulation
Ältere Kommentare anzeigen
I have a given (and very large) set of matlab functions, that perform a simulation (calculate new states within a for loop). Now I have some algorithms implemented in Simulink that I want to invoke into the matlab function. Some of the matlab states are inputs of the Simulink model and the outputs of the model are processed in the matlab functions.
I was thinking about building a mex file from simulink to call it then in the m files calculation loop. But there is hardly any documentation about how to call such a level 2 mex file in matlab.
Does hanyone have example code or a tutorial how to do this? (Or a different approach)
Antworten (2)
A Jenkins
am 13 Mai 2014
simout=sim('modelname');
MATLAB Function Block
1 Kommentar
Lorenz Padberg
am 14 Mai 2014
ragesh r menon
am 14 Mai 2014
0 Stimmen
can't you use MATLAB function blocks in Simulink to achieve this?
Kategorien
Mehr zu Simulink Coder finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!