Help determining equation
Bobb Fwed
Posts: 1,119
A couple years ago I asked here on the forums a similar question. I had it answered once using a program called RobotBasic and some programming in there, and I hope to find a similar solution again...
I have some data points that are part of a electronic (hardware) function. I want to get an equation I can put into float math that outputs the correction for the input from the hardware. Maybe it's better with an example: I originally got the solution for an RC circuit because the return values are logarithmic to the inputs, so it needed correction.
The equation is in the form of:
(-379.223 * ln( input ) + 4054.36
I still have RobotBasic installed, but I can't find the program that created the equation.
New set of data (I can get more if needed, but 3 should be enough to make a curve):
input: 1011 -- output: 1079
input: 796 -- output: 613
input: 159 -- output: 345
Any help getting the equation would be helpful.
I have some data points that are part of a electronic (hardware) function. I want to get an equation I can put into float math that outputs the correction for the input from the hardware. Maybe it's better with an example: I originally got the solution for an RC circuit because the return values are logarithmic to the inputs, so it needed correction.
The equation is in the form of:
(-379.223 * ln( input ) + 4054.36
I still have RobotBasic installed, but I can't find the program that created the equation.
New set of data (I can get more if needed, but 3 should be enough to make a curve):
input: 1011 -- output: 1079
input: 796 -- output: 613
input: 159 -- output: 345
Any help getting the equation would be helpful.
Comments
Excel.exe and OpenOffice calc.exe offer a diagram-type XY-Points.
These diagrams have a feature add aproximation function.
You can choose linear, polynomic, exponential, logarhitmical functions
and you can even display the relation-factor which indicates how good the aprox-function is in touch with the given datapoints.
So if you need an aprox-function only once at compile-time you can use this solution.
If you need different aprox-functions at run-time you can dive into the mathematics how it is calculated
keep the questions coming
best regards
Stefan
double click on the xy-diagramm to enter modification mode
if not yet done choose subtype "with connecting lines between points"
leftclick on the connecting line rightclick on that line choose option "insert trendline"
you a new window pops up "regression curve for datarow X"
OpenOffice has not reached the level of Excel but it is coming closer and closer
keep the questions coming
best regards
Stefan