function [response]=tresponse(temp,T1,T2,T3,T4,igrowth);
expon=2-igrowth; % gives quadratic for default and linear for V-S model
if (temp<T1)
    response=0.0;
else if (temp<T2)
        response=(temp-T1)^expon/(T2-T1)^expon;
    else
        if (temp<T3)
            response=1.0;
        else
            if (temp<T4)
                response=(T4-temp)^expon/(T4-T3)^expon;
            else
                response=0.0;
            end
        end
    end
end
