フィルターのクリア

I want to find the value of k

6 ビュー (過去 30 日間)
SANDIPKUMAR ROYADHIKARI
SANDIPKUMAR ROYADHIKARI 2021 年 10 月 23 日
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 ?

回答 (1 件)

John D'Errico
John D'Errico 2021 年 10 月 23 日
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))]
k = 
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])
ans = 
  1 件のコメント
SANDIPKUMAR ROYADHIKARI
SANDIPKUMAR ROYADHIKARI 2021 年 10 月 23 日
Ok, thanx sir

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeNumber Theory についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by