running simulink in rapid acceleration mode within a function

2 vues (au cours des 30 derniers jours)
Arco
Arco le 31 Jan 2014
Réponse apportée : Arco le 5 Fév 2014
Hi,
the calculation of my simulink simulation, takes about 30s in rapid acceleration mode, and about 10 min in accelaration mode. Since I need the result of the simulation to calculate gradients for fmincon, it is neccessary, that I evaluate the result of the simulation in a function. Therefore, in my function that calculates the gradients, I'm using:
options = simset('SrcWorkspace','current', 'DstWorkspace', 'current');
sim('sensitivityAnalysis',[],options);
With this, I make sure, that Simulink uses the workspace of the function and not the global workspace.
Unfortunately, 'DstWorkspace' is not supported in rapid acceleration mode.
Is there any alternative?
At the moment, I have absolutely no idea, how to use the rapid accelerator mode for calculating the gradients in a way, that works with fmincon.
Thanks, Arco

Réponse acceptée

Arco
Arco le 5 Fév 2014

Plus de réponses (0)

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by