Intersection of piecewise defined functions.
Show older comments
Hello,
I would like to calculate the value for that two functions are equal:
function no. 1:
F_2_origin_cond = (1-((1- wblcdf(t-delta12_origin,eta_hat_2,beta_hat))./(1-Age_t1_origin))).*(t>=2000);
F_2_origin_cond = 0.*(t<2000);
function no. 2:
y=0.876;
Does somebody know if it is possible in MATLAB?
Accepted Answer
More Answers (1)
John D'Errico
on 3 Feb 2016
Edited: John D'Errico
on 3 Feb 2016
0 votes
Of course it is possible.
Hint: subtract the two, then search for a root. This applies even if one of the functions is not constant, as it is here.
So, you could use a numerical solver. Or you could use a symbolic solver.
As far as the function being a piecewise one, that is not relevant, since for t < 2000, the function is trivially zero, therefore the two can never be equal in that domain. So all that matters is you find a root of the difference above 2000 for t.
Categories
Find more on Utilities for the Solver in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!