syms x t
Me=0.07+0.16-0.01*t;
rho=2700;
A=0.0004;
L=0.37;
Mb=rho*A*L
[email=f=@(c]f=@(c[/email]) Me/Mb*c*(cos(c)*sinh(c)-sin(c)*cosh(c))+cos(c)*cosh(c)+1; %define the function
i=0;
j=1;
%To get the lower n roots of f(x)=0.
n=3; %set n
while j<=n
if f(i)*f(i+1)<= 0
lambda(j)=fzero(f,i);
j=j+1;
end
i=i+1;
end
phi=cosh(lambda*x/L)-cos(lambda*x/L)-(cosh(lambda)+cos(lambda))/(sinh(lambda)+sin(lambda))*(sinh(lambda*x/L)-sin(lambda*x/L));