Solving an equation with different inputs

Hi all!
Im trying to work with matlab and solving the following equation f(c)=0.
If anyone could help, would be very nice!
n=2.4
alpha = [0:0.01:0.8];
f(c) = alpha+((1-c).^n)-c*n.*(1-c).^(n-1);==0

 Accepted Answer

Torsten
Torsten on 15 Mar 2022
Edited: Torsten on 15 Mar 2022
n = 2.4;
ALPHA = 0:0.01:0.28;
c0 = 1.0;
for i = 1:numel(ALPHA)
alpha = ALPHA(i);
f = @(c) alpha +(1-c).^n - c*n.*(1-c).^(n-1);
C(i) = fzero(f,c0);
c0 = C(i);
end
plot(ALPHA,C)
Sometimes there are two zeros in [0;1] ; depending on the initial value, fzero can only solve for one of them.
The limiting value for alpha to get a zero of the function seems ((n-1)/(n+1))^(n-1) ~ 0.2887.

More Answers (1)

R
R on 16 Mar 2022
Thank you so much Torsten, you helped me out allot!

Categories

Find more on Mathematics in Help Center and File Exchange

Products

Asked:

R
R
on 15 Mar 2022

Answered:

R
R
on 16 Mar 2022

Community Treasure Hunt

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

Start Hunting!