% Testing equation is % function = 0.08 - 0.0314*(T-298) - 5.346*(10^-11)*((T^4) - (298^4) = 0 % 1. we define the function, % 2. Insert T value to the function, here we insert T values from 200 to % 400 using while loop. % 3. One T value will give a value of function(eq). We check that value is % close to the zero ( approximately smaller than 0.01, this value cc=an % be changed later) % 4. When value of function becomes smaller than 0.01 loop breaks, and that T % value is taken as the answer. T = 200; while T<400 eq = 0.08 - 0.0314*(T-298) - 5.346*(10^-11)*((T^4) - (298^4)); if(eq<0.01) %use round function if you want to get the answer into integer answer_T = round(T); fprintf('%d\n',answer_T); break; end %increse the T value by 0.1 each time T = T + 0.1; end %end while loop