stacksize ('max');

// Grundwertreihe des Thermoelements Typ T nach DIN EN 60584-1;

//Temperatur T[°C];
T=[-270:1:400];

//Spannung U[microV];
U=[-6257.51,-6256.31,-6254.76,-6252.87,-6250.68,-6248.2,-6245.43,-6242.4,-6239.11,-6235.56,-6231.77,-6227.72,-6223.44,-6218.91,-6214.14,-6209.13,-6203.87,-6198.38,-6192.64,-6186.66,-6180.43,-6173.97,-6167.26,-6160.31,-6153.12,-6145.69,-6138.01,-6130.11,-6121.96,-6113.58,-6104.97,-6096.13,-6087.06,-6077.77,-6068.26,-6058.52,-6048.58,-6038.42,-6028.05,-6017.47,-6006.69,-5995.72,-5984.54,-5973.18,-5961.62,-5949.88,-5937.95,-5925.85,-5913.56,-5901.11,-5888.48,-5875.68,-5862.71,-5849.58,-5836.29,-5822.84,-5809.23,-5795.46,-5781.54,-5767.47,-5753.24,-5738.87,-5724.34,-5709.68,-5694.86,-5679.9,-5664.8,-5649.55,-5634.16,-5618.63,-5602.96,-5587.15,-5571.2,-5555.11,-5538.89,-5522.52,-5506.02,-5489.38,-5472.6,-5455.69,-5438.64,-5421.46,-5404.14,-5386.69,-5369.1,-5351.38,-5333.52,-5315.53,-5297.4,-5279.15,-5260.75,-5242.23,-5223.57,-5204.78,-5185.86,-5166.81,-5147.63,-5128.31,-5108.86,-5089.29,-5069.58,-5049.74,-5029.77,-5009.68,-4989.45,-4969.1,-4948.61,-4928,-4907.26,-4886.39,-4865.4,-4844.27,-4823.02,-4801.65,-4780.14,-4758.51,-4736.75,-4714.87,-4692.86,-4670.73,-4648.47,-4626.08,-4603.57,-4580.94,-4558.17,-4535.29,-4512.28,-4489.14,-4465.88,-4442.5,-4418.99,-4395.36,-4371.61,-4347.73,-4323.72,-4299.6,-4275.35,-4250.97,-4226.48,-4201.86,-4177.11,-4152.25,-4127.26,-4102.15,-4076.91,-4051.56,-4026.08,-4000.48,-3974.76,-3948.92,-3922.95,-3896.87,-3870.66,-3844.34,-3817.89,-3791.32,-3764.64,-3737.83,-3710.9,-3683.86,-3656.69,-3629.41,-3602.01,-3574.49,-3546.86,-3519.1,-3491.23,-3463.24,-3435.14,-3406.92,-3378.58,-3350.13,-3321.56,-3292.88,-3264.08,-3235.17,-3206.14,-3177,-3147.74,-3118.38,-3088.89,-3059.3,-3029.59,-2999.77,-2969.83,-2939.79,-2909.63,-2879.36,-2848.98,-2818.49,-2787.88,-2757.17,-2726.34,-2695.4,-2664.36,-2633.2,-2601.93,-2570.55,-2539.06,-2507.47,-2475.76,-2443.94,-2412.02,-2379.99,-2347.84,-2315.59,-2283.23,-2250.77,-2218.2,-2185.51,-2152.73,-2119.83,-2086.83,-2053.73,-2020.51,-1987.2,-1953.77,-1920.24,-1886.61,-1852.88,-1819.04,-1785.09,-1751.05,-1716.9,-1682.64,-1648.29,-1613.83,-1579.27,-1544.61,-1509.85,-1474.99,-1440.03,-1404.97,-1369.8,-1334.54,-1299.18,-1263.72,-1228.15,-1192.49,-1156.73,-1120.87,-1084.91,-1048.86,-1012.7,-976.44,-940.09,-903.63,-867.08,-830.43,-793.68,-756.84,-719.89,-682.85,-645.71,-608.48,-571.14,-533.71,-496.19,-458.57,-420.86,-383.05,-345.15,-307.16,-269.08,-230.9,-192.64,-154.29,-115.85,-77.32,-38.7,...
0,38.78,77.63,116.55,155.54,194.6,233.73,272.93,312.21,351.57,391,430.5,470.08,509.75,549.49,589.31,629.2,669.18,709.25,749.39,789.61,829.92,870.31,910.78,951.34,991.98,1032.7,1073.51,1114.4,1155.38,1196.45,1237.6,1278.83,1320.15,1361.56,1403.05,1444.62,1486.29,1528.04,1569.87,1611.79,1653.8,1695.89,1738.07,1780.34,1822.69,1865.12,1907.64,1950.25,1992.94,2035.72,2078.58,2121.53,2164.56,2207.68,2250.88,2294.17,2337.54,2380.99,2424.53,2468.15,2511.85,2555.64,2599.51,2643.46,2687.5,2731.61,2775.81,2820.09,2864.45,2908.9,2953.42,2998.02,3042.71,3087.47,3132.31,3177.24,3222.24,3267.32,3312.48,3357.72,3403.03,3448.43,3493.9,3539.45,3585.08,3630.78,3676.56,3722.41,3768.34,3814.35,3860.43,3906.59,3952.82,3999.13,4045.51,4091.96,4138.49,4185.09,4231.77,4278.52,4325.34,4372.23,4419.2,4466.24,4513.35,4560.53,4607.78,4655.11,4702.5,4749.97,4797.5,4845.11,4892.78,4940.53,4988.34,5036.23,5084.18,5132.2,5180.29,5228.45,5276.68,5324.97,5373.33,5421.76,5470.26,5518.83,5567.46,5616.16,5664.92,5713.75,5762.65,5811.62,5860.65,5909.74,5958.9,6008.13,6057.42,6106.78,6156.2,6205.69,6255.24,6304.86,6354.54,6404.28,6454.09,6503.96,6553.9,6603.9,6653.96,6704.09,6754.28,6804.53,6854.84,6905.22,6955.66,7006.16,7056.73,7107.36,7158.04,7208.8,7259.61,7310.48,7361.42,7412.41,7463.47,7514.59,7565.77,7617.01,7668.32,7719.68,7771.1,7822.58,7874.13,7925.73,7977.4,8029.12,8080.9,8132.74,8184.65,8236.61,8288.63,8340.71,8392.85,8445.04,8497.3,8549.62,8601.99,8654.42,8706.91,8759.46,8812.06,8864.73,8917.45,8970.23,9023.06,9075.96,9128.91,9181.92,9234.98,9288.1,9341.28,9394.51,9447.81,9501.15,9554.56,9608.02,9661.53,9715.1,9768.73,9822.41,9876.15,9929.94,9983.78,10037.69,10091.64,10145.65,10199.72,10253.84,10308.01,10362.24,10416.52,10470.86,10525.25,10579.69,10634.18,10688.73,10743.33,10797.99,10852.69,10907.45,10962.26,11017.13,11072.04,11127.01,11182.03,11237.1,11292.22,11347.39,11402.62,11457.89,11513.22,11568.6,11624.02,11679.5,11735.03,11790.6,11846.23,11901.91,11957.63,12013.41,12069.24,12125.11,12181.03,12237,12293.02,12349.09,12405.21,12461.37,12517.59,12573.85,12630.15,12686.51,12742.91,12799.36,12855.86,12912.41,12969,13025.64,13082.32,13139.05,13195.83,13252.65,13309.52,13366.44,13423.4,13480.4,13537.46,13594.55,13651.69,13708.88,13766.11,13823.39,13880.71,13938.08,13995.49,14052.95,14110.45,14167.99,14225.58,14283.21,14340.89,14398.61,14456.37,14514.18,14572.03,14629.92,14687.86,14745.84,14803.86,14861.93,14920.04,14978.19,15036.38,15094.62,15152.9,15211.22,15269.59,15328,15386.45,15444.94,15503.47,15562.05,15620.67,15679.33,15738.03,15796.78,15855.56,15914.39,15973.26,16032.17,16091.12,16150.12,16209.16,16268.23,16327.35,16386.51,16445.72,16504.96,16564.24,16623.57,16682.94,16742.35,16801.8,16861.29,16920.82,16980.39,17040,17099.66,17159.35,17219.09,17278.86,17338.68,17398.54,17458.44,17518.37,17578.35,17638.37,17698.43,17758.53,17818.67,17878.85,17939.07,17999.33,18059.62,18119.96,18180.34,18240.75,18301.21,18361.7,18422.24,18482.81,18543.42,18604.07,18664.75,18725.48,18786.24,18847.04,18907.87,18968.75,19029.66,19090.6,19151.58,19212.6,19273.66,19334.74,19395.87,19457.03,19518.22,19579.44,19640.7,19701.99,19763.31,19824.67,19886.06,19947.47,20008.92,20070.4,20131.9,20193.44,20255,20316.59,20378.2,20439.84,20501.51,20563.2,20624.91,20686.64,20748.4,20810.17,20871.97];

//Koeffizienten der Referenzfunktion

//-270°C bis 0°C
[C0minus]=0.0000000000E00
[C1minus]=3.8748106364E01
[C2minus]=4.4194434347E-02
[C3minus]=1.1844323105E-04
[C4minus]=2.0032973554E-05
[C5minus]=9.0138019559E-07
[C6minus]=2.2651156593E-08
[C7minus]=3.6071154205E-10
[C8minus]=3.8493939883E-12
[C9minus]=2.8213521925E-14
[C10minus]=1.4251594779E-16
[C11minus]=4.8768662286E-19
[C12minus]=1.0795539270E-21
[C13minus]=1.3945027062E-24
[C14minus]=7.9795153927E-28

//0°C bis 400°C
[C0plus]=0.0000000000E00
[C1plus]=3.8748106364E01
[C2plus]=3.3292227880E-02
[C3plus]=2.0618243404E-04
[C4plus]=-2.1882256846E-06
[C5plus]=1.0996880928E-08
[C6plus]=-3.0815758772E-11
[C7plus]=4.5479135290E-14
[C8plus]=-2.7512901673E-17

//Koeffizienten der inversen Referenzfunktion

//-200°C bis 0°C
[invC0minus]=0.0000000000E00
[invC1minus]=2.5929192E-02
[invC2minus]=-2.1316962E-07
[invC3minus]=7.9018692E-10
[invC4minus]=4.2527777E-13
[invC5minus]=1.3304473E-16
[invC6minus]=2.0241446E-20
[invC7minus]=1.2668171E-24

//0°C bis 400°C
[invC0plus]=0.0000000000E00
[invC1plus]=2.592800E-02
[invC2plus]=-7.602961E-07
[invC3plus]=4.637791E-11
[invC4plus]=-2.165394E-15
[invC5plus]=6.048144E-20
[invC6plus]=-7.293422E-25

//Grenzabweichungen und Toleranzen nach Europäische Norm EN 60584-2 : 1996
//-200 °C bis 370 °C

//Klasse 1
//-40°C bis 125°C [K]
[0.5;-0.5]
//125°C bis 350°C [%]
[0.4;-0.4]

//Klasse 2
//-40°C bis 133°C [K]
[1.0;-1.0]
//133°C bis 350°C [%]
[0.75;-0.75]

//Klasse 3
//-200°C bis -67°C [%]
[1.5;-1.5]
//-67°C bis 40°C [K]
[1.0;-1.0]

//Darstellung

figure("figure_name",gettext("Thermoelement Typ T"),"Position",[50,50,500,500],"BackgroundColor",[1.0,1.0,1.0])
title('$Grundwertreihe$','color','black','fontsize',5)
plot2d(T,[U],[5])
xgrid()
xlabel('Temperatur [°C]')
ylabel('Spannung [microV]')

