ele = [1 2 5 4; 2 3 6 5; 4 5 8 7; 5 6 9 8];
% ele is a matrix with 4 rows and 4 columns
% Now T shall divide each row in 2 triangles (row with three columns), where the first row gets the first three values of each element row and the second row gets the 2 last values of a element row and at least the first one.
% for example = T(1,:) = [1 2 5], T(2,:) = [5 4 1]
Best Answer