Project 13- Polynomial Regression

setChartLibrary(‘google-chart’);
setChartTitle(‘Polynomial Regression’);
setChartType(‘predictionGraph’);
setAxisName(‘time_stamp’,‘temp’);
mul(0.0977);
plotChart(‘time_stamp’,‘temp’);

In this code, what is mul used for? And what is 0.0977 exactly?

mul() function is used to multiply all the data points obtained with the given value in the brackets, in this case it is 0.0977. 0.0977 when multiplied helps in converting the obtained data to Celsius. It is same as dividing the points with 10.24.

Hii @180020039

mul(0.0977) multiplies 0.0977 to the temp value given by the LM35 sensor, in order to convert the output to degree celsius.

Hope this helps! :smiley:

mul() is used for multiplying the all the data points obtained by the temperature sensor(LM35)by the value specified in the brackets.
The readings given by the sensor are the voltage readings. To convert the readings into Celsius, they are divided by 10.24 or multiplied by (1/10.24) or, in other words multiplied by 0.0977.
i.e.,
Temperature(in Celsius ) = (value from sensor)/10.24 = (value from sensor) x 0.0977