how to solve implicit equation with two variables

조회 수: 3 (최근 30일)
xueqi
xueqi 2013년 7월 31일
Dear fellows,
I have a function like this pf=f(p1,p2). The problem is "pf" is a vecotor so in fact there are two output for this function, pf(1) and pf(2). And there is not explicit expression for function f. It is a big function and involves a lot of logic compare, etc inside it. I want to solve for p1 and p2 such that pf(1)=1000 and pf(2)=1000. Do you know how to realize this?
Cheers, Xueqi
  댓글 수: 6
Walter Roberson
Walter Roberson 2013년 7월 31일
You are right, sum() could result in accidental zeros. The difficulty with sum(f2(p).^2) is that it will not have 0 crossings, just a single 0 (round-off permitting); if that is acceptable then fminbnd() would likely be a better choice than fsolve()
xueqi
xueqi 2013년 8월 1일
As I see, I think the problem comes from the function are far from smooth. It has numerous local minimum. Probably this is the reason it stuck at the initial point...So I think we should look for some way to get rid of this problem. How does fminbnd work better in this aspect?

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by