How to get the output result from a jacobian as this.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Gan Huang
am 24 Mär. 2022
Beantwortet: Torsten
am 24 Mär. 2022
I was trying to get the number result from the jacobian by define X1 to X7 after I found the jacobian in X1 to X7 term as the code show. How can i do this?
clc
clear
accept_error = 0.001;
maxiter = 50;
P = 20;
dx = 0;
X0 = [0.5;1;0.5;0;0;1;1]; %Initial Guess
syms X1 X2 X3 X4 X5 X6 X7
F = [0.5*X1 + X2 + 0.5*X3 - X6/X7;
X3 + X4 + 2*X5 - 2/X7;
X1 + X2 + X5 - 1/X7;
-28837*X1 - 139009*X2 - 78213*X3 + 18927*X4 + 8427*X5...
+ (13492/X7) - 10690*(X6/X7);
X1 + X2 + X3 + X4 + X5 - 1;
(P^2)*X1*(X4^3) - 1.7837*(10^5)*X3*X5;
X1*X3-2.6058*X2*X4];
jac = jacobian(F,[X1,X2,X3,X4,X5,X6,X7]);
X1 = X0(1); X2 = X0(2); X3 = X0(3); X4 = X0(4); X5 = X0(5);
X6 = X0(6); X7 = X0(7);
Result = jac; %%%???
0 Kommentare
Akzeptierte Antwort
Torsten
am 24 Mär. 2022
jac = subs(jac,[X1,X2,X3,X4,X5,X6,X7],[X0(1),X0(2),X0(3),X0(4),X0(5),X0(6),X0(7)])
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!