Tf = dsolve(' m * CP * DTf = w *(h 1+H2 *(2 * Tf+7))',' Tf(0)=Tin ',' x ')
Results:
Tf =
- 1/2/H2 * h 1-7/2+exp(2 * w * H2/m/CP * x)*(Tin+ 1/2/H2 * h 1+7/2)
Calculating the known conditions before substitution can reduce unnecessary errors.