Linear Exponential Combination Fit
|
11-30-2020, 03:45 PM
Post: #1
|
|||
|
|||
Linear Exponential Combination Fit
http://edspi31415.blogspot.com/2020/11/h...ation.html
The program LINEXPREG attempts to fit bivariate data to the curve: y = a + b * x + c * e^x The LSQ (least square) function is used. The output is a list of three matrices: * A matrix of coefficients: [ [ a ] [ b ] [ c ] ] * A matrix of y values entered * A matrix of predicted y values HP Prime Program LINEXPREG Code: EXPORT LINEXPREG(lx,ly) Example x list: {0, 1, 2, 3, 4, 5} y list: {2, 7, 13, 18, 26, 34} LINEXPREG({0, 1, 2, 3, 4, 5},{2, 7, 13, 18, 26, 34}) Results: {coefficients, y values, predicted y values} coefficients: [ [ 1.74935499143 ] [ 5.39455446221 ] [ 3.66584105034E-2 ] ] y values: [ [ 2 ] [ 7 ] [ 13 ] [ 18 ] [ 26 ] [ 34 ] ] predicted y values: [ [ 1.78601340193 ] [ 7.24355734477 ] [ 12.8093349675 ] [ 18.6693222357 ] [ 25.3290542368 ] [ 34.1627178129 ] ] Equation: y = 1.74935499143 + 5.39455446221 * x + 3.66584105034E-2 * e^x |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Linear Exponential Combination Fit - Eddie W. Shore - 11-30-2020 03:45 PM
RE: Linear Exponential Combination Fit - Albert Chan - 12-03-2020, 01:39 AM
|
User(s) browsing this thread: 1 Guest(s)