Graph intersection of 3 curves
Ältere Kommentare anzeigen
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:

Akzeptierte Antwort
Weitere Antworten (1)
Roger Stafford
am 8 Dez. 2014
1 Stimme
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'.
Kategorien
Mehr zu Two y-axis finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!