commandwindow
clear
clc
close all

% Estimating tghe values of the temperature
% The values of a should be the coefficients T1,T2,T3....T6
% The values of b should be the solution
a = [ 1  1  -2  1  3  -1
      2  -1  1  2  1  -3
      1  3  -3  -1  2  1
      5  2  -1  -1  2  1
      -3  -1  2  3  1  3
      4  3  1  -6  -3  -2];

  b = [ 4  20  -15  -3  16  -27 ]';

  x = inv(a)*b
x =

            1
           -2
            3
            4
            2
           -1