Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

provide the matlab code that will exactly locate the two intersectionss between the curves.

1 Ansicht (letzte 30 Tage)
f = @(x) 0.5*x^2 - 3*x + 9; g = @(x) 10*exp(x/10);
if method can be solved using fzero please use that

Antworten (1)

Walter Roberson
Walter Roberson am 6 Dez. 2015
That problem cannot be solved. There are three intersections, not two, and the intersections locations are all at irrational (and possibly transcendental) locations. It is therefore not possible to exactly locate the intersections.
You should plot the functions to see that there are three intersections. They are at roughly -1/4, +10, +45
  4 Kommentare
Dan
Dan am 6 Dez. 2015
hmm.. this was a question from an old exam so my prof must expect some sort of answer.. thanks for the help tho!
Walter Roberson
Walter Roberson am 6 Dez. 2015
Sometimes teachers think of numeric solutions as "exact" solutions, but numeric solutions are seldom exact solutions.
fzero could certainly be used to get numeric solutions. A key trick here is to give it a range of values that it is allowed to search over, instead of just giving one starting point. See the fzero documentation.

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by