I have programmed a script in Octave consisting in a set of differential equations that models a dynamic system. First, I typed them using symbolic variables and then I assigned numerical values to the constants of my system. Then, I defined vector ‘X’ as the vector containing the names of state-space variables that appear in my differential equations, vector ‘dX’ as the vector containing the names of the derivatives of the ‘X’ variables and ‘U’ as the vector containing the names of state-space inputs.
Do you know a command or a straightforward way to automatically extract the state-space A,B,C,D matrices from that set of differential equations (having defined ‘X’, ‘U’ and ‘dX’ vectors )? I know it can be done manually, but it consumes time and maybe there is a simple way using commands.
Many thanks and kind regards