To give more insight, here is the part of the code where i do the calculation of alpha:
%%Calculation of Alpha using Secant Method
erralpha = 3
alpha = 0;
B = 100;
k=0;
while ge(erralpha,1)
syms alph
alt0 =0;
SRH0 = eval(subs(SRH,alt,alt0));
FF = alt0-alph*SRH0;
F = subs(A,alt,FF);
dF = diff(F,alph);
ddF = diff(dF,alph);
step_size = dF/ddF;
ss = eval(subs(step_size,alph,alpha));
alphanew = alpha-ss;
Ccurr = eval(subs(F,alph,alpha));
Cnew = eval(subs(F,alph,alphanew));
erralpha = abs((Cnew-Ccurr)*100/Ccurr);
alpha = alphanew;
end