Graph intersection of 3 curves
Afficher commentaires plus anciens
I have 3 functions:
x=-1:0.001:1;
y1=((3*x.^2)-1)/2;
y2=((5*x.^3)-(3*x))/2;
y3=((35*x.^4)-(30*x.^2)+3)/8;
plot(x,y1,'g-',x,y2,'r--',x,y3,'b-.');
I need to find all the interception points in the graphic.
The result should look like this:

Réponse acceptée
Plus de réponses (1)
Roger Stafford
le 8 Déc 2014
1 vote
Use 'roots' on the cubic polynomial difference between y1 and y2 to get the three intersections of the y1 and y2 curves. Similarly the difference between y1 and y3 and the difference between y2 and y3 will give quartic polynomials that produce four roots using 'roots'.
Catégories
En savoir plus sur Two y-axis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!