K型热电耦高精度分段线性拟合(C程序)
Posted lort
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了K型热电耦高精度分段线性拟合(C程序)相关的知识,希望对你有一定的参考价值。
extern float GetTempOfVolMi(float V)
{
float K,B;
if(0.03947 <= V < 2.02308) //0~50
{
K = 24.731;
B = 0.1341;
}
else if(2.02308 <= V < 4.09623)//50-100
{
K = 24.075;
B = 1.3446;
}
else if(4.09623 <= V < 6.13834)//100-150
{
K = 24.515;
B = -0.5417;
}
else if(6.13834 <= V < 8.13847)//150-200
{
K = 24.982;
B = -3.3434;
}
else if(8.13847 <= V < 10.15337)//200-250
{
K = 24.824;
B = -1.9926;
}
else if(10.15337 <= V < 12.20857)//250-300
{
K = 24.336;
B = 2.975;
}
else if(12.20857 <= V < 14.29315)//300-350
{
K = 23.97;
B = 7.4128;
}
else if(14.29315 <= V < 16.39714)//350-400
{
K = 23.775;
B = 10.196;
}
else if(16.39714 <= V < 18.51581)//400-450
{
K = 23.59;
B = 13.219;
}
else if(18.51581 <= V < 20.64429)//450-500
{
K = 23.483;
B = 15.19;
}
else if(20.64429 <= V < 22.77643)//500-550
{
K = 23.483;
B = 15.17;
}
else if(22.77643 <= V < 24.90547)//550-600
{
K = 23.474;
B = 15.376;
}
else if(24.90547 <= V < 27.02486)//600-650
{
K = 23.579;
B = 12.729;
}
else if(27.02486 <= V < 29.12897)//650-700
{
K = 23.763;
B = 7.767;
}
else if(29.12897 <= V <31.21345)//700-750
{
K = 23.995;
B = 0.9894;
}
else if(31.21345 <= V <33.27538)//750-800
{
K = 24.258;
B = -7.2115;
}
else if(33.27538 <= V < 35.31311)//800-850
{
K = 24.539;
B = -16.581;
}
else if(35.31311 <= V <37.32592)//850-900
{
K = 24.835;
B = -27.028;
}
else if(37.32592 <= V <39.31353)//900-950
{
K = 25.146;
B = -38.627;
}
else if(39.31353 <= V <41.27561)//950-1000
{
K = 25.476;
B = -51.592;
}
else return -1;
return V*K+B;
}
以上是关于K型热电耦高精度分段线性拟合(C程序)的主要内容,如果未能解决你的问题,请参考以下文章