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

 Respuesta aceptada

Torsten
Torsten el 15 de Mzo. de 2022
Editada: Torsten el 15 de Mzo. de 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.

Más respuestas (1)

R
R el 16 de Mzo. de 2022

0 votos

Thank you so much Torsten, you helped me out allot!

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Productos

Preguntada:

R
R
el 15 de Mzo. de 2022

Respondida:

R
R
el 16 de Mzo. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by