MATLAB: Solve equation in matlab transcendental equation What is the matlab code to solve this equation? cos(βL)cosh(βL)= -1 for L = 1,2,3,4 And, how to plot the result? Thanks Best Answer % rewrite equation to be equal to zero for fsolve and save as a function handleeqn = @(beta, L) cos(beta .* L) .* cosh(beta .* L) + 1;% define values for LL = 1:4;% call fsolvesol = fsolve(@(beta)eqn(beta,L),[1 1 1 1])% test the quality of the result - all results should be near zerotest = eqn(sol,L)% plot resultsplot(L, sol)xlabel('L')ylabel('beta') Related SolutionsMATLAB: How to solve the implicit equation for N=8, exp(-L)=L/N, find L Use vpasolve() and declare L as syms L (requires symbolic toolbox) at the beginning and solve it's not hard MATLAB: Solving trigonometrique equation You will never get an analytical result here.vpasolve(g1)ans =-0.04489097131344154920928045475445 Related QuestionFor loop outputs into matrices
Best Answer