how to solve an equation iteratively?

조회 수: 1 (최근 30일)
Randy Chen
Randy Chen 2021년 2월 24일
댓글: Randy Chen 2021년 2월 24일
I need to solve the following equation and get a real number:
Below are my codes. When doing this, the solution returned are all complex values. How can I iteratively solve this equation such that x can be a real number? I already know the correct solution is about 7.78016, but I need to reproduce the procedure
syms x
eqn1 =200 == x*(1-(0.4*(x-1))/sqrt(2.8*2.4*x+0.4))^(-2.8/0.4);
sol = solve(eqn1,x)

채택된 답변

Walter Roberson
Walter Roberson 2021년 2월 24일
syms x
eqn1 =200 == x*(1-(0.4*(x-1))/sqrt(2.8*2.4*x+0.4))^(-2.8/0.4);
sol = solve(eqn1, x);
sol = sol(imag(sol) == 0)
sol = 
vpa(sol)
ans = 
7.7212920018186473025078617929192

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by