Kod: Markera allt
if (temp < 0) then humidityThreshold = 100 elseif (temp > 22) then
humidityThreshold = 79 - 5
else
humidityThreshold = integer(-0.0015 * temp ^ 3+0.1193 * temp ^ 2 - 2.9878 * temp + 102.96) - 5
if (humidityThreshold > 100) then
humidityThreshold = 100
elseif (humidityThreshold < 0) then
humidityThreshold = 0
end
end
CDEF:Mi=-0.0015,Temp,LOG,3,*,EXP,*,0.1193,Temp,LOG,2,*,EXP,*,+,2.9878,Temp,*,-,102.96,+,5,-
Vilket motsvarar (ser så ut iaf, om jag är rätt på det)
humidityThreshold = integer(-0.0015 * temp ^ 3+0.1193 * temp ^ 2 - 2.9878 * temp + 102.96) - 5
Hur får man till IF villkor tex?
Någon som vill hjälpa till?
//Lenny