How to run exp in bisection method
์ด์ ๋๊ธ ํ์
How to find the root of e^x-x^2+3x-2=0 by using bisection method using Matlab?
๋๊ธ ์: 1
James Tursa
2022๋
6์ 21์ผ
Is this a homework assignment where you have to hand-code the bisection method?
๋ต๋ณ (1๊ฐ)
Hi @Nadiah
fcn = @(x) exp(x) - x.^2 + 3*x - 2;
x0 = 0; % initial guess
xroot = fzero(fcn, x0)
fplot(fcn, [-pi, pi], 'linewidth', 1.5)
hold on
plot(xroot, 0, 'ro', 'linewidth', 1.5, 'MarkerSize', 10)
grid on, xlabel('x'), ylabel('f(x)')
์นดํ ๊ณ ๋ฆฌ
๋์๋ง ์ผํฐ ๋ฐ File Exchange์์ Calculus์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
