MATLAB: Solve an eqution in matlab

solve

Hello! How can I write this equation in matlab: The variable here is t, all other variables including Rt are known.I want to find t by solving D(t)=R(t).

Best Answer

D(t)=R_t
<=> D(t)-R_t=0
use fzero
tSolution=fzero(D(t)-R_t,0)
but care, the output can be contain more than 1 solution, if D and R have more than 1 intersection point