Solving for unknown iteratively, guess and check

조회 수: 2 (최근 30일)
Mark
Mark 2013년 10월 17일
편집: Jonathan LeSage 2013년 10월 17일
Hi,
I'm hoping to solve for an unknown in an equation that cann't be solved for directly. Instead, I have measured values (from data), and an equation relating my unknown to the theoretical calculated value.
I have 1000+ data points of F_measured and an equation that looks something like this
F_calc = a(b*sqrt(c*(1 - x/d)^k)) + x*e
where a, b, c, d, and k are constants and x is my unknown.
What I need to do is iterate through possible values of x until the % difference between F_calc and F_measured is < 10e-5... and x values can be quite large so thousands of tiny steps is very impractical if not impossible. Any ideas how to do this more efficiently?

답변 (1개)

Jonathan LeSage
Jonathan LeSage 2013년 10월 17일
편집: Jonathan LeSage 2013년 10월 17일
Perhaps a better way of formulating the problem is to solve for the zeros of the nonlinear function.
F - a*(b*sqrt(c*(1 - x/d)^k)) + x*e = 0
To learn more:
doc fzero

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by