MATLAB: How to get the equation of a function in simulink

powerlibSimscape Electrical

Dear all I am new to simulink and I am creating an electrical circuit using powerlib. I have been using a "Scope" to view my voltage (AC), but it is better if simulink can return me the equation of the graph plotted in the "Scope". Anyone know how to do this? Many thanks

Best Answer

No, I don't think that is possible. You could log the output data to the workspace however, and use something like the Curve Fitting Toolbox in MATLAB to fit the data to a curve.
Typically, Simulink models can also be linearized around an operating point using the DLINMOD or LINMOD functions to obtain a state-space representation, but I'm not sure if those functions work with SimPowerSystems.