Converting a nonlinear state equation into state dependent matrix form
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Sam Chak
il 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 Commenti
Vedere anche
Categorie
Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!