Finding minimum point from any function file input.
3 次查看(过去 30 天)
显示 更早的评论
Given ANY function file input, which we can assume to be continuous between [1,2], what is the code to estimate the x-value where the graph achieves its minimum point?
0 个评论
回答(2 个)
Matt Kindig
2013-10-9
编辑:Matt Kindig
2013-10-9
I would check out the documentation for fminsearch() and fminbnd(), or if you have the Optimization Toolbox, fminunc():
doc fminsearch
doc fminbnd
doc fminunc
For example, if your function is f(x)=sin(x), you can call it like this:
sol = fminbnd(@sin, 1, 2)
2 个评论
Matt Kindig
2013-10-9
Are the f(x) functions pre-defined, or can they be literally anything? If they can be anything, this problem is impossible to solve, as there are an infinite number of f(x) functions possible.
What exactly is your goal here?
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!