Réponse acceptée

John D'Errico
John D'Errico le 14 Déc 2022
Modifié(e) : John D'Errico le 14 Déc 2022

1 vote

Please stop asking the same question. This is just a continuation of your last question.
syms T
Fx=3*T.^2-12*T+16;
Fy=2-9*T+6*T.^2-T.^3;
fplot(Fx,Fy,[0,5])
You are asking how to find the self-intersection point on this curve. Said another way, you want to find the point where the curve crosses itself. Mathematically, what does that mean? Mathematically, it asks for a pair of distinct values of T, such that Fx(T1) == Fx(T2) and Fy(T1) == Fy(T2).
syms T1 T2
Fxeq = subs(Fx,T,T1) - subs(Fx,T,T2)
Fxeq = 
Fyeq = subs(Fy,T,T1) - subs(Fy,T,T2)
Fyeq = 
We now have two equations in the two unknowns T1 and T2.
[T1sol,T2sol] = solve(Fxeq,Fyeq,[T1,T2])
T1sol = 
T2sol = 
As expected, we can ignore the case where T1=T2 =0. And there is complete symmetry here, so solutions 2 and 3 are the same solution, just swapped around.
xsol = expand(subs(Fx,T,T1sol(2)))
xsol = 
13
ysol = expand(subs(Fy,T,T1sol(2)))
ysol = 
0
fplot(Fx,Fy,[0,5])
hold on
plot(double(xsol),double(ysol),'rs')
title("[ " + double(xsol) + " , " + double(ysol)+ " ]")
xline(13,'g')
yline(0,'g')
The intersection lies at (x,y) = (13,0).

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by