i need to solve the ecuation: f(x)=sqrt(x)-cos(x) but im given the following interval [0,1]
23 views (last 30 days)
Show older comments
i need to solve the ecuation: f(x)=sqrt(x)-cos(x) but im given the following interval [0,1]
0 Comments
Answers (1)
Sam Chak
on 16 Sep 2022
Hi @Eva
f = @(x) sqrt(x) - cos(x)
fplot(f, [0 1])
x0 = 0.6; % guess the solution is relatively close to x = 0.6
xsol = fzero(f, x0)
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!