PDA

View Full Version : Calculating MKT



pedja089
- 10th November 2013, 13:28
Hi,
I need little help about math for calculating Mean kinetic temperature (http://en.wikipedia.org/wiki/Mean_kinetic_temperature).
I have 10-60 samples on same time interval.
First I was thinking that I maybe put this equation in exel or matlab, and then try to get polynomial, but with 60 variables, I think that is too much.

Second attempt is to implement logarithm and exponential in code by developing it to power series. But as far as I can see now problem is using only integers.

Accuracy about +/-0.5 should be acceptable. Does someone have some clever way to solve this?

p.s.
I'm using PIC18, so I can use LONG variables.
Thanks

pedja089
- 10th November 2013, 14:46
delta H/R=10000, For temperature range we have range for -delta H/RTn from -30 to -40.
e^-30 is about 10^-13
e^-40 is about 10^-18
So how to represent that and fit into long variable?
Second problem is to calculate ln of that value?
Final result is 10000, divided with -ln. So that isn't problem.