필터 지우기
필터 지우기

Find specific point in unknown "function"

조회 수: 1 (최근 30일)
Peter Uwsen
Peter Uwsen 2019년 3월 29일
댓글: Peter Uwsen 2019년 3월 29일
Hello,
I have the following problem:
I do know the "shape" of the relationship between two variables x and y, but I don't know the exact values and it takes a lot of time to calculate them.. (for each x I can find an y)
I'm interested in finding the point, where y=1. To get there I want to have to calculate as few values as possible.
Does anyone know an algorithm, that could help me do this and is more "efficient" than just increeasing gradualy x from x_start till I get the desired y?
Thanks in advance!
PS: here you can see the genmeral shape of the relationship:
function.jpg
  댓글 수: 3
KSSV
KSSV 2019년 3월 29일
interp1....
Jan
Jan 2019년 3월 29일
@Torsten: I'd vote for your solution, if it is posted as answer.

댓글을 달려면 로그인하십시오.

채택된 답변

Alan Weiss
Alan Weiss 2019년 3월 29일
편집: Alan Weiss 2019년 3월 29일
The most efficient way is to use fzero as Torsten said. Your function is @(x)y(x)-1. For the most efficiency, set the initial point x0 to an interval [x1,x2] where the function changes sign between x1 and x2.
Alan Weiss
MATLAB mathematical toolbox documentation
P.S. If you have Optimization Toolbox, then fsolve can be even faster than fzero.
  댓글 수: 1
Peter Uwsen
Peter Uwsen 2019년 3월 29일
Ok cool!
Thanks for the quick answers :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by