Dear all, Many thanks in advance for your assistance on this matter.
During simulating on my thesis, I've faced with challenges regarding to simulate the model in steady sate, I need to generate the 'xInitial'.
However, I've tried it to refer many documents, but no one talk about this.
Could you please tell me in details about it that how could I reach generate 'xInitial' properly for new model?

Antworten (1)

yassine
yassine am 17 Jul. 2026 um 7:28

0 Stimmen

MODEL = 'you simulink model';
% Do NOT load old initial state
set_param(MODEL,'LoadInitialState','off');
% Tell Simulink to save final state
set_param(MODEL,'SaveFinalState','on');
set_param(MODEL,'FinalStateName','xFinal');
open_system(MODEL);
% Run simulation AND CAPTURE RESULT
simOut = sim(MODEL,'StopTime','60');
% Extract the TRUE electrical final state
xInitial = simOut.get('xFinal');
% Save it for later reuse
save('xInitialV10_DYn.mat','xInitial');

Kategorien

Mehr zu Statics and Dynamics finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 4 Mär. 2016

Beantwortet:

am 17 Jul. 2026 um 7:28

Community Treasure Hunt

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

Start Hunting!

Translated by