Converting a nonlinear state equation into state dependent matrix form

9 次查看(过去 30 天)
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.

回答(1 个)

Sam Chak
Sam Chak 2025-2-10
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

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by