Converting a nonlinear state equation into state dependent matrix form
6 views (last 30 days)
Show older comments
I have a set of nonlinear state equation with origin convergence. i want the representation in form [Xdot]= [A(x)] * [x]. I tried jacobian but it's not the accurate representation. Would appreciate any suggestion.
0 Comments
Answers (1)
Sam Chak
on 10 Feb 2025
Based on your descriptions, it is entirely acceptable to use the nonlinear state equations for simulation purposes. If your manually-defined Jacobian representation yields inaccurate responses, it is possible that the linearization components have been calculated incorrectly.
%% nonlinear state equations
function dx = ode(t, x)
dx(1) = x(2);
dx(2) = - x(2) - sin(x(1));
dx = [dx(1);
dx(2)];
end
%% simulation
[t, x] = ode45(@ode, [0 10], [1 0]);
plot(t, x), grid on
0 Comments
See Also
Categories
Find more on Systems of Nonlinear Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!