anyway to find common tangent for two functions

조회 수: 4 (최근 30일)
Yu Li
Yu Li 2021년 6월 10일
편집: Matt J 2021년 6월 10일
Hi:
I have two functions, and I want to find a tangent circle with a given radius, for example, function y=0.5*x and y=x^2, is there anyway to achieve this in Matlab?
code to plot the figure is shown below:
x=0:0.01:1;
y1=0.5*x;
y2=x.^3;
f=figure('color','w');
hold on
plot(x,y1)
plot(x,y2)
Thanks!
Yu

답변 (1개)

Matt J
Matt J 2021년 6월 10일
편집: Matt J 2021년 6월 10일
The problem has 6 unknowns, the (xc,yc) coordinates of the circle center and the (x,y) coordinates of each point of tangency. Each point of tangency must satisy 3 equations, the equation for the curve, the equation for the circle, and the equation that matches their derivatives. You can therefore write down 6 equations in 6 unknowns and solve them with fsolve.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by