Find zeros in interval

19 views (last 30 days)
Harel Harel Shattenstein
Harel Harel Shattenstein on 6 Jul 2018
Answered: Torsten on 6 Jul 2018
I try to find a solution for
Try 1
syms x t
f=@(x)int(exp(-(t./x).^2),t,-1,1)-1.5;
fzero(f,[0.5,2])
Try 2
solve(int(exp(-(t./x).^2),t,-1,1)==1.5,x)
The first try does not work, the second work but I can enter an inverval How can I solve an equation given an interval?

Accepted Answer

Torsten
Torsten on 6 Jul 2018
f=@(x)integral(@(t)exp(-(t/x).^2),-1,1)-1.5;
sol=fzero(f,[0.5,2])

More Answers (1)

Walter Roberson
Walter Roberson on 6 Jul 2018
vpasolve() permits you to enter ranges to search over.

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!