MATLAB Answers

How two find the intersection coordinates between these two functions?

1 ビュー (過去 30 日間)
Good afternoon, I am quite new to Matlab, right now I need to find the intersection between the next two functions, specifically functions a (which is the upper section of a circle) and yc1. I know there are two intersecting points and just need the x coordinates in order to use it as the minimum range for the yc1 function. As you can see if plotted, I want yc1 to start at the intersection with the circular function (a and b).
rin = 1; %radius of circle
dtf = 0.923; %distance to yc1
th = 0:pi/125:2*pi;
a = rin * cos(th); %upper semicircle
b = rin * sin(th); %lower semicircle
plot(a,b,'--k')
hold on
xp = dtf:0.002:0.5+dtf;
yc1 = -(0.2 * (1 - (((xp-dtf)-0.5)/0.5).^(2)).^(1/2)) + 0.2 + 0.2; %intersecting function
plot(xp,yc1)
The x value of the intersection coordinate for this specific problem equals 0.9324, although I will be changing some constants and need to find a general way to find such intersection. I have tried using intsx = solve(a==yc1,x) with no success. Thank you for your help, I hope I made my objective clear.
BTW, I am using the student version of the software.

  0 件のコメント

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

採用された回答

darova
darova 2020 年 6 月 12 日
try polyxpoly

  1 件のコメント

Mateo Landazuri Pachano
Mateo Landazuri Pachano 2020 年 6 月 30 日
This worked perfectly, thank you!

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by