function [Td] = find_Td (t,x) % this function is used to find the time cPARP reaches half its maximum % concentration % t is the time vector corresponding to x % x is the reagent values at a given time. % Td is the time of half maximum cPARP concentration [s] x = x/(max((x))); Td = 0; for i = 1:length(x)-1 if x(i)<.5 && x(i+1)>.5 Td = (t(i+1)-t(i))/(x(i+1) - x(i))*(.5 - x(i)) + t(i); elseif x(i) == .5 Td = t(i); end end end