I want to find the value of k
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
syms x1 x2 x3
x=[x1;x2;x3];
f1=x(1)^3+12*x(2)+1;
f2=x(2)^9+5*x(1)-3;
f3=x(2)*x(3)^2+8;
k=[diff(f1,x(1)),diff(f1,x(2)),diff(f1,x(3));diff(f2,x(1)),diff(f2,x(2)),diff(f2,x(3));diff(f3,x(1)),diff(f3,x(2)),diff(f3,x(3))];
x=[2;5;9];
With these values of x
I want to find out the value of k, how do I do that ?
0 commentaires
Réponses (1)
John D'Errico
le 23 Oct 2021
syms x1 x2 x3
x=[x1;x2;x3];
f1=x(1)^3+12*x(2)+1;
f2=x(2)^9+5*x(1)-3;
f3=x(2)*x(3)^2+8;
Here is the matrix k.
k=[diff(f1,x(1)),diff(f1,x(2)),diff(f1,x(3));diff(f2,x(1)),diff(f2,x(2)),diff(f2,x(3));diff(f3,x(1)),diff(f3,x(2)),diff(f3,x(3))]
So, a function of x1, x2, and x3.
Why did you define x as x=[x1;x2;x3];, when you never used it again?
If you wish to substitute for x1, x2, x3, you could do this:
subs(k,[x1,x2,x3],[2 5 9])
Voir également
Catégories
En savoir plus sur Number Theory dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!