Intersection of Two Implicit Curves over a domain

3 ビュー (過去 30 日間)
Rodrigo
Rodrigo 2013 年 5 月 8 日
コメント済み: Sudhanshu Verma 2020 年 11 月 19 日
I have two implicit equations, one circle and one ellipse. I would like to know if there is a function or a way to find an intersection belonging to a given domain. Consider, for example:
circ = @(x,y) x^2+y^2-4 elp = @(x,y) ((x-2))^2+((y+2)/4)^2-1
There are two points of intersection (approximately):
P1 ~ (1.00 , -1.73) P2 ~ (1.46 , 1.37)
So I would like to know how to find P1, knowing it lies somewhere between: X: (0.8 , 1.2) Y: (-2 , -1)
OBS: I have no problems with numeric approximations, especially if it is not computationally intensive.
Thanks

採用された回答

Teja Muppirala
Teja Muppirala 2013 年 5 月 9 日
This sort of problem can be solved easily using FSOLVE
circ = @(x,y) x^2+y^2-4
elp = @(x,y) ((x-2))^2+((y+2)/4)^2-1
fsolve(@(X)[circ(X(1),X(2)); elp(X(1),X(2))],[1 -1.5])
This returns
ans =
1.0023 -1.7307
  2 件のコメント
Ankit Singh
Ankit Singh 2017 年 3 月 13 日
Can we use this without having to enter the probable range, i.e. [1 -1.5]? Also can this method be used for 2 ellipses?
Sudhanshu Verma
Sudhanshu Verma 2020 年 11 月 19 日
But there are 2 point of intersection, how would you find the second one

サインインしてコメントする。

その他の回答 (1 件)

Rodrigo
Rodrigo 2013 年 5 月 9 日
that was just what i needed! thanks!
  1 件のコメント
Fenil Patel
Fenil Patel 2019 年 3 月 1 日
can this method used for two intersecting cylinder??

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by