Forming an equation from data

Soldato
Joined
16 Feb 2007
Posts
2,617
Need some maths help with a calibration curve we have produced at work. Following the instructions we are to plot log CO2 against mV. We tried to get excel to produce an equation of the graph but it spits out natural log which when rearrange come out as zero.

We resorted to printing the graph and drawing a straight line to form an equation but that also produces nonsensical numbers.

Does anyone have the time and skill to help use produce a formula we can use to determine CO2 concentration from a mV reading? Really appreciated if you could help

Data

CO2 0.5 = 20850mV
1.0 = 19037
2.5 = 15371
4.0 = 13957
 
y = 228.41e-3E-04x
R² = 0.9935

Where x is the mV input and y is you CO2

Don't know where you are getting zero from? exp one side and then ln on the other if you rearrange? Are you sure you are doing it right?

Remember that -3E-04 is 0.0003 not 30000
 
Last edited:
y = 228.41e-3E-04x
R² = 0.9935

Where x is the mV input and y is you CO2

Don't know where you are getting zero from? exp one side and then ln on the other if you rearrange? Are you sure you are doing it right?

Remember that -3E-04 is 0.0003 not 30000

Many thanks feriso, it was the -3e-04 that was confusing us and making all our numbers wrong. Many thanks :)
 
Many thanks feriso, it was the -3e-04 that was confusing us and making all our numbers wrong. Many thanks :)

If you have Matlab use the curve fitting tool. It's designed for stuff like your case.

If you don't have Matlab download Octave (free and open source), and curve fit using Octave.

I wouldn't use Excel.
 
If you have Matlab use the curve fitting tool. It's designed for stuff like your case.

If you don't have Matlab download Octave (free and open source), and curve fit using Octave.

I wouldn't use Excel.

Even with the limited data available? What's wrong with Excel in this instance out of interest?
 
What sort of CO2 levels are you measuring? Is there a nicer way of reading the levels to just give a direct value rather than doing loads of maths?
 
Use the LINEST function in Excel, it will produce a polynomial curve through your data and provide you with the co-efficients.
 
Use the LINEST function in Excel, it will produce a polynomial curve through your data and provide you with the co-efficients.

I'd be very cautious about this! There are four pairs of data values given; strictly speaking this isn't enough data to fit even a linear regression without the danger of over-fitting.
 
I'd be very cautious about this! There are four pairs of data values given; strictly speaking this isn't enough data to fit even a linear regression without the danger of over-fitting.

This, you've only got 4 data points so no point in overcomplicating things.
 
Even with the limited data available? What's wrong with Excel in this instance out of interest?

I'm speaking in general :)

Matlab allows you to select your curve fitted parameters (polynomial, linear etc) and will tell you the degree of error compared to your data. I don't think Excel does this.

Excel is a great piece of software. But I don't think it's the best tool for curve fits.
 
I'm speaking in general :)

Matlab allows you to select your curve fitted parameters (polynomial, linear etc) and will tell you the degree of error compared to your data. I don't think Excel does this.

Excel is a great piece of software. But I don't think it's the best tool for curve fits.

Excel can produce 'trendlines' on graphs where you can select linear, polynomial, power, exponential trends/regressions etc and can produced R squared values which show how close the trendline is to your data.

Not saying MATLAB isn't good, but Excel is pretty decent.
 
Back
Top Bottom