Hi, I need to have this kind of result: (the scaling of the axes, and the graph of the 3rd and 6th subplots)
Here is my code:
for k = 1:6 ax(k) = subplot(3,3,k);endsubplot(ax(1))fplot(@(x) cos(x))xlabel('x')ylabel('y')title('cos(x)')axis([-5 5 -1 1])subplot(ax(2))fplot(@(x) cos(x))xlabel('x')ylabel('y')title('cos(x)')axis([0 2 -1 1])subplot(ax(3))fimplicit(@(x,y) (1/y)-(log(y))+(log(-1+y))+x-1)xlabel('x')ylabel('y')title('1/y-log(y)+log(-1+y)+x-1=0')axis([-5 5 -5 5])subplot(ax(4))fimplicit(@(x,y) x^2+y^2-4)xlabel('x')ylabel('y')title('x^2+y^2-4=0')axis([-5 5 -5 5])%Plot for x^3+y^3-5xy+1/5=0
subplot(ax(5))fimplicit(@(x,y) x^3+y^3-(5*x*y)+(1/5))xlabel('x')ylabel('y')title('x^3+y^3-5xy+1/5=0')axis([-2 2 -3 3])t = -5:5;x = sin(t);y = cos(t);subplot(ax(6))plot(x,y)xlabel('x')ylabel('y')title('x = sin(t),y = cos(t)')axis([-0.5 0.5 -1 1])
This is the result I get using my code:
Thank you in advance!
Best Answer