Two functions equal for which values?

Hi,
If i have 2 functions, in this case:
alfa=linspace(0,25);
cl_1=@(alfa)a0*alfa-a0*deltaalfa*((a0*alfa/(clmax+a0*deltaalfa))).^n1;
cl_2=@(alfa)clmax-deltacl+(1/5)*(a0*alfa-clmax);
CL_1=cl_1(alfa);
CL_2=cl_2(alfa);
If i now want to put those equal to eachother and find for what alfa values those are equal, how do i do that?
Best regards,
Daniel

回答(1 个)

Without your constants, I cannot write more exact code. There are a few ways to estimate the approximate values of ‘alfa0’ that are close to the intersections, so you would calculate them and loop through them to get each result from fzero.
The general idea to get the real values of the intersections of the two curves:
cl_1=@(alfa)a0*alfa-a0*deltaalfa*((a0*alfa/(clmax+a0*deltaalfa))).^n1;
cl_2=@(alfa)clmax-deltacl+(1/5)*(a0*alfa-clmax);
alfa0 = ...; % Initial ‘alfa’ Estimate
intersec = fzero(@(alfa) cl_1(alfa)-cl_2(alfa), alfa0) % Estimate ‘alfa’ At One Intersection
There are other functions, such as fsolve, as well. Note that without knowing what ‘n1’ and the other constants are, there is no way to know if there are any intersections.

类别

帮助中心File Exchange 中查找有关 Biotech and Pharmaceutical 的更多信息

标签

提问:

2016-9-17

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by