Two functions equal for which values?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
0 commentaires
Réponses (1)
Star Strider
le 17 Sep 2016
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.
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!