I want to find the value of k
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
SANDIPKUMAR ROYADHIKARI
am 23 Okt. 2021
Kommentiert: SANDIPKUMAR ROYADHIKARI
am 23 Okt. 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;
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 Kommentare
Antworten (1)
John D'Errico
am 23 Okt. 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])
Siehe auch
Kategorien
Mehr zu Number Theory finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!