You certainly do throw the parentheses around... :)
sumenergy2= ((delta_H_T_ref)+ ((delta_Cp)*((T_isoth)-(T_ref)));
12 3 45 6 78 9 1 111
shows there are 13(!!!) in the expression so there's one unbalanced pair -- as usual, MATLAB is right. :)
Superfluous () make it much harder to read the code--for the humans, anyways...
Let's see if we can clean up a little and find the problem...
sumenergy2= (delta_H_T_ref + (delta_Cp*(T_isoth-T_ref));
is left after removing the innermost pairs around the individual variables. They serve no purpose at all
That leaves five(5) ; the next step would be
sumenergy2= delta_H_T_ref + (delta_Cp*(T_isoth-T_ref);
removing the outermost pair that are also of no need/use; the sum is a quantity w/o encapsulating further as there are no other operations on the compound object other than assignment to the LHS.
Now it's easy to see the extra one in front of the second term in the addends.
sumenergy2= delta_H_T_ref + delta_Cp*(T_isoth-T_ref);
is now balanced and is much simpler to read and computes the desired result with the only needed grouping on the temperature difference to be multiplied by the heat capacity.
I'd suggest a cleanup of the rest of the code by the same logic -- it will become much easier to read and maintain.
sumenergy=tetha_1*Cp_1*(T_isoth-T_1) + tetha_2*Cp_2*(T_isoth-T_2) + tetha_3*Cp_3*(T_isoth-T_3);
I'd also note a stylistic form in using MATLAB -- if the constants Cp and theta (tetha?) and the variable T were arrays instead of named variables, then you could use the builtin array operations within MATLAB and write:
where each of theta, Cp, T_isoth are 3x1 (or 1x3) vectors.