fplot giving a different graph than my graphing calculator
Show older comments
I am trying to graph a function in order to apply a Golden Section Search on it. However, fplot in matlab gives a completely different graph of the function than the same function graphed on my graphing calculator. The graph looks the exact same no matter what graphing tool I use (Desmos, Geogebra, etc), but in MatLab, it looks completely different. The function does not seem to be wrong since it calculates the right value for my input, so I am not sure what is wrong.
h=@(x)(12.6915*exp(0.5*x)-6.3).^2;
fplot(h)
I am pretty new to MatLab so I am not sure if I am plotting this right. I am just clueless as to why the graphs are so different.
Edit: When I plot the function on an iterval of [-2,-1], it looks the plots on the graphing calculators. Is there anyway to fix it so it plots like this without defining an interval?
Accepted Answer
More Answers (0)
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!