-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusage.txt
95 lines (82 loc) · 5.54 KB
/
usage.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
------------------------------------------------------------------------
+ Least Square Method +
+ The least square method is the process of finding the best-fitting +
+ curve or line of best fit for a set of data points by reducing the +
+ sum of the squares of the offsets (residual part) of the points +
+ from the curve. +
------------------------------------------------------------------------
Wait a sec
\
Program Loaded Succesfully!
Following are the available option for Curve fitting:
{+}-----------------------{+}---------------------------{+}
# #
# 1) Straight line: y=ax+b #
# 2) Parabola: y=ax^2+bx+c or y=a+bx+cx^2 #
# 3) Exponential curve: y=ae^bx #
# 4) Curve: y=ax^b and #
# 5) Another curve: y=ab^x #
# {99} Exit #
# #
{+}-----------------------{+}---------------------------{+}
To Use any of the curve input corresponding number:
Select a Curve= 2
#*#*#*#*#*#*#*#*#**#*#*#*#**#*#*#*#**#*#*#*#*#*#**#*#*#*#**#*#*#*#**#*#
#* #*
#* Curve Fitting #*
#* By #*
#* Least Square Method #*
#* Find the Parabola that BEST fits for your data #*
#* Credit- Monirul Shawon #*
#* #*
#*#*#*#*#*#*#*#*#**#*#*#*#**#*#*#*#**#*#*#*#*#*#**#*#*#*#**#*#*#*#**#*#
{1} Y = aX^2 + bX + c
{2} Y = a + bX + cX^2
1 or 2 ? : 1
How many number of sets you've got there?
n= 9
Input values of x:
x1 = 1
x2 = 11
x3 = 111
x4 = 1111
x5 = 11111
x6 = 111111
x7 = 1111111
x8 = 11111111
x9 = 111111111
Input values of y:
y1 = 1
y2 = 12
y3 = 123
y4 = 1234
y5 = 12345
y6 = 123456
y7 = 1234567
y8 = 12345678
y9 = 123456789
+-------------+-------------+-----------------------+------------------------+------------------------+-----------------------+------------------------+
| x | y | x^2 | x^3 | x^4 | xy | x^2*y |
+-------------+-------------+-----------------------+------------------------+------------------------+-----------------------+------------------------+
| 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 |
| 11.0 | 12.0 | 121.0 | 1331.0 | 14641.0 | 132.0 | 1452.0 |
| 111.0 | 123.0 | 12321.0 | 1367631.0 | 151807041.0 | 13653.0 | 1515483.0 |
| 1111.0 | 1234.0 | 1234321.0 | 1371330631.0 | 1523548331041.0 | 1370974.0 | 1523152114.0 |
| 11111.0 | 12345.0 | 123454321.0 | 1371700960631.0 | 1.524096937357104e+16 | 137165295.0 | 1524043592745.0 |
| 111111.0 | 123456.0 | 12345654321.0 | 1371737997260631.0 | 1.5241518061362597e+20 | 13717319616.0 | 1524145099853376.0 |
| 1111111.0 | 1234567.0 | 1234567654321.0 | 1.3717417009602606e+18 | 1.5241572930956562e+24 | 1371740973937.0 | 1.524156485292114e+18 |
| 11111111.0 | 12345678.0 | 123456787654321.0 | 1.3717420713305902e+21 | 1.5241578417924106e+28 | 137174198628258.0 | 1.5241577472946224e+21 |
| 111111111.0 | 123456789.0 | 1.234567898765432e+16 | 1.371742108367627e+24 | 1.5241578966620942e+32 | 1.371742098628258e+16 | 1.5241578858405732e+24 |
+-------------+-------------+-----------------------+------------------------+------------------------+-----------------------+------------------------+
+-------------+-------------+------------------------+------------------------+------------------------+------------------------+------------------------+
| ∑x | ∑y | ∑x^2 | ∑x^3 | ∑x^4 | ∑xy | ∑x^2*y |
+-------------+-------------+------------------------+------------------------+------------------------+------------------------+------------------------+
| 123456789.0 | 137174205.0 | 1.2470382813318368e+16 | 1.3731152235537695e+24 | 1.5243103276893707e+32 | 1.3855980781754446e+16 | 1.5256835692700237e+24 |
+-------------+-------------+------------------------+------------------------+------------------------+------------------------+------------------------+
Equation 1 is: 137174205.0 = 1.2470382813318368e+16 a + 123456789.0 b + 9 c
Equation 2 is: 1.3855980781754446e+16 = 1.3731152235537695e+24 a + 1.2470382813318368e+16 b + 123456789.0 c
Equation 3 is: 1.5256835692700237e+24 = 1.5243103276893707e+32 a + 1.3731152235537695e+24 b + 1.2470382813318368e+16 c
So, the best fitted Parabola for your data is:
Y = 3.9238470866541194e-16 X^2 + 1.1111110623944773 X -0.4309764817141041
Want to calculate again? Yes or No : no
Goodbye!