Log(y)=A*f1(x) +
B*f2(x)
f1(x)=1
f2(x)=log(x)
x |
Y |
Log(y) |
F1 |
F1^2 |
F2(x)=log(x) |
F2^2 |
F1*F2 |
Log(Y)*F1 |
Log(Y)*F2 |
2.5 3.5 5 6 7.5 10
12.5 15 17.5 20 |
7 5.5 3.9 3.5 3.1 2.8 2.6
2.4 2.3 2.3 |
0.845098040014257 0.740362689494244 0.591064607026499 0.544068044350276 0.491361693834273 0.447158031342219 0.414973347970818
0.380211241711606 0.361727836017593 0.361727836017593 |
1 1 1 1 1 1 1 1 1 1 |
1 1 1 1 1 1 1 1 1 1 |
0.397940008672038 0.544068044350276 0.698970004336019 0.778151250383644 0.8750612633917 1
1.09691001300806
1.17609125905568
1.24303804868629
1.30102999566398 |
0.158356250501901 0.296010036883134 0.488559066961494 0.605519368473628 0.765732214688678 1 1.20321157663733 1.38319064962718 1.54514359048183 1.69267904961742 |
0.397940008672038 0.544068044350276 0.698970004336019 0.778151250383644 0.8750612633917 1 1.09691001300806 1.17609125905568
1.24303804868629
1.30102999566398 |
0.845098040014257 0.740362689494244 0.591064607026499 0.544068044350276 0.491361693834273 0.447158031342219 0.414973347970818 0.380211241711606
0.361727836017593
0.361727836017593 |
0.336298321371996 0.402807680583044 0.41313643093618 0.423367229004951 0.429971584588904 0.447158031342219 0.455188420520668 0.447163117971726
0.449641463438823
0.47061876492551 |
|
|
|
|
10 |
|
9.1384018038726 |
9.11125988754769 |
5.17775336777938 |
4.27535104468402 |
N=10
Solve for A,B:
A_matrix =
10
9.11125988754769
9.11125988754769
9.1384018038726
b =
5.17775336777938
4.27535104468402
Solve for x.
>> x=inv(A_matrix) * b
x =
0.999234664547637
-0.528422340830939
so, A=
0.999234664547637
B= -0.528422340830939
But A = log10(a)
A
So 10 = a
So a = 9.9823930184707
b= B = -0.528422340830939
so fitting power
function is 9.982383 x ^(-0.5284223)
>> plot(x,Y,'o')
>> y=9.982383 * x .^(-0.5284223);
>> y'
6.15111510562453
5.14916183120815
4.26464506030034
3.87294879566411
3.44217022210418
2.95673177595292
2.62786176913272
2.38649968051915
2.19981016237795
2.04993913240556
>> hold on;
>> plot(x,y,'r');
>> legend('observation','power fit');