Two functions equal for which values?

5 ビュー (過去 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 Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by