MATLAB: How to export the state-space model of a simulink model

physical equationsimulink

hello everybody,
I work the first time with Simulink and I try to generate physical equations of my model. At first, I tried to build a c-code-model. It doesn't works… Do I have other options to create them?
thank you for your informations!

Best Answer

If you want to convert a Simulink model to a set of state-space equations, you can linearize it using the Simulink Control Design product. If your model is fully linear, this is a good way of converting a graphical model into a state-space object usable in MATLAB. If the model is nonlinear, this will give a linear approximation of your model about a particular operating point.
The MathWorks Web site has an entire page devoted to this workflow. http://www.mathworks.com/discovery/linearization.html
Best,
Sebastian
Related Question