Two functions equal for which values?

조회 수: 7 (최근 30일)
Daniel
Daniel 2016년 9월 17일
답변: Star Strider 2016년 9월 17일
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개)

Star Strider
Star Strider 2016년 9월 17일
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.

카테고리

Help CenterFile Exchange에서 Biotech and Pharmaceutical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by