Find intersection between parametric and linear function
이전 댓글 표시
Hey, I would like to calculate the intersections between the involute function of a circle and a linear equation. The involute is defined by
x = r*(cos(theta)+theta*sin(theta)
y = r*(sin(theta)-theta*cos(theta)
and the linear function could be for example
y = m*x+b
r, m and b are given constants, so x, y and theta are variable.
I tried to work with symbolic variables and solve(), but could not figure out/find an answer how to solve this.
Thank you for advices in advance David
답변 (1개)
John D'Errico
2017년 8월 1일
r = 2.5;
m = 2;
b = 0.5;
If y = m*x+b, then IF a solution exists, just use vpasolve because no analytical solution will be found. You can do some of the work like this:
syms theta
vpasolve(r*(sin(theta)-theta*cos(theta)) == m*( r*(cos(theta)+theta*sin(theta)))+b,theta)
ans =
-226.65351205603315482138913576327
Note that the solution will be in radians, AND that there will be multiple solutions. Infinitely many solutions in fact.
카테고리
도움말 센터 및 File Exchange에서 Numeric Solvers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!