|
|
a = [1,2;3,4;5,6;7,8;9,10];
' v5 p+ s( [1 eresult = fit(a(:,1),a(:,2),'poly1')) R7 L% t, ~, Q' V9 n2 x& z
coefficients = coeffvalues(result); h1 F5 g, q# e2 s( V. [
( j+ v% q% t5 S. O) ?
" `& L" H( ]9 l9 K M
result =
3 b* g1 W: B+ o( H5 |1 P
/ q, {; I4 \3 O9 ? Linear model Poly1:
2 F* y6 s- Q1 B6 c3 o result(x) = p1*x + p2
9 v: o8 S! C8 i S- M Coefficients (with 95% confidence bounds):
) r* u* y1 F6 a: Z; L p1 = 1 (1, 1)% [7 K6 l: N. y$ m% j
p2 = 1 (1, 1)
8 f" ~/ Z# ]) ]3 M7 y
; o+ O' w# z8 G5 a$ V: Ecoefficients =8 Q* G* `/ _4 q# W
5 g5 C, e% {5 |1 R; Z8 [ ^% n+ F
1.000000000000000 1.000000000000000 |
|