how do i specify initial conditions for a 2*2 system in matlab without opening the model in simulink. how do i linearize a 2*2 system in matlab without opening the model in simulink.

1 view (last 30 days)
i have 2*2 system i want to linearize in matlab. i want to do it such a way that i will not have to open the model in simulink to specify initial conditions. the system has multiple operating points which i can specify as initial conditions in the integrator blocks in simulink but i want to be able to specify these initial conditions in matlab editor without opening the integrator blocks. pls how do i go about it? in summary, my question is on how to linearize a 2*2 system in matlab without opening integrator blocks to specify initial conditions.
thank you.

Accepted Answer

Sebastian Castro
Sebastian Castro on 15 Dec 2015
Edited: Sebastian Castro on 15 Dec 2015
Easiest thing to do is to use MATLAB variables for the initial conditions in your Integrator blocks... for example x1_init and x2_init.
Then, you can just enter the following code in MATLAB:
>> x1_init = 0;
>> x2_init = -2;
>> sys = linearize('myModel', ...);
- Sebastian

More Answers (0)

Categories

Find more on Event Functions in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!