How can I find the unknown parameters of a non-linear equation ??

2 ビュー (過去 30 日間)
chetan meena
chetan meena 2016 年 6 月 6 日
コメント済み: chetan meena 2016 年 6 月 6 日
I am having a equation z^2=x(1)*a+x(2)*b+x(3)*c+x(4)*a^2+x(5)*b^2+x(6)*c^2+x(7)*a*b+x(8)*a*c+x(9)*c*b
Value of a b c and z
a=[27 26.4 29.19 22.22 27.5 21.33 23.84 31.11 19.5 28.44 22.5 36.08]
b=[95 87 81 72 76 76 95 82 89 89 88 83 ]
c=[171.3 191.9 105.9 167.2 172.8 112.7 106.9 122.2 124.9 98.8 120.1 161.6 ]
z=[0.76 0.33 0.51 0.85 0.81 1.02 0.36 0.86 0.28 0.59 0.73 0.38 ]
can anyone explain the steps for finding x(1)...........x(9)

採用された回答

Walter Roberson
Walter Roberson 2016 年 6 月 6 日
A = [a(:), b(:), c(:), a(:).^2, b(:).^2, c(:).^2, a(:).*b(:), a(:).*c(:), b(:).*c(:)];
B = z(:).^2;
x = A\B;
Your equation is linear in your x, so you can just construct the coefficient matrix and use the \ operator.
You will only get meaningful results if your a, b, c, and z are at least 9 elements long.

その他の回答 (1 件)

chetan meena
chetan meena 2016 年 6 月 6 日
編集済み: chetan meena 2016 年 6 月 6 日
but i am having function which is not linear so what should i do in that case
i have this
f = 0; for i =1:236
f = f + (z(i) - (a(i)^3*x(1)+ a(i)^2*b(i)*x(2)+ a(i)^2*c(i)*x(3)+ a(i)*b(i)*c(i)*x(4)+ a(i)*b(i)*x(5)+ a(i)*c(i)*x(6)+ a(i)*x(7)+ b(i)^3*x(8)+ b(i)^2*a(i)*x(9)+ b(i)^2*c(i)*x(10)+ c(i)^3*x(11)+ c(i)^2*b(i)*x(12)+ c(i)^2*a(i)*x(13)+ b(i)*x(14)+ c(i)*x(15)))^2
  2 件のコメント
Walter Roberson
Walter Roberson 2016 年 6 月 6 日
chetan meena
chetan meena 2016 年 6 月 6 日
thanks

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by