function [T_star] = CLTv_Tsetfunc(t,p)

t_m0_in = p(27);
T_set = p(29);
T_amb = p(43);
a_3=p(46);
a_4= p(47);
a_5 = p(48);

if t <= t_m0_in
    
    T_star = T_amb+((T_set-T_amb)*((a_3*(t/t_m0_in)^3)+(a_4*(t/t_m0_in)^4)...
        +(a_5*(t/t_m0_in)^5)));
else
    
    T_star = T_set;

end