y1 = @(x) ((3*x.^2)-1)/2;
y2 = @(x) ((5*x.^3)-(3*x))/2;
y3 = @(x) ((35*x.^4)-(30*x.^2)+3)/8;
e0 = linspace(-1,1,10);
for k1 = 1:length(e0)
y1y2(k1) = fzero(@(x) (y1(x)-y2(x)), e0(k1));
y1y3(k1) = fzero(@(x) (y1(x)-y3(x)), e0(k1));
y2y3(k1) = fzero(@(x) (y2(x)-y3(x)), e0(k1));
end
y1y2 = unique(round(y1y2*1E+3)/1E+3);
y1y3 = unique(round(y1y3*1E+3)/1E+3);
y2y3 = unique(round(y2y3*1E+3)/1E+3);
x = linspace(-1,1);
figure(1)
plot(x,y1(x),'g-',x,y2(x),'r--',x,y3(x),'b-.');
hold on
plot(y1y2, y1(y1y2), 'kp', 'MarkerSize',8, 'MarkerFaceColor','y')
plot(y1y3, y3(y1y3), 'kp', 'MarkerSize',8, 'MarkerFaceColor','y')
plot(y2y3, y2(y2y3), 'kp', 'MarkerSize',8, 'MarkerFaceColor','y')
hold off
Best Answer