x=linspace(0,4*pi,100);
y=sin(x);
z=cos(x);

close all

figure
% plot(x,y)
% hold on
% plot(x,z)
plot(x,y,'--g',x,z,':r')
xlabel('x')
ylabel('sin and cos')
title('sin(x) and cos(x)')
legend('sin','cos')
xlim([0 10])
ylim([-2 2])
grid on


figure
subplot(2,3,1)
plot(x,y)

subplot(2,3,2)
plot(x,z)

subplot(2,3,3)
plot(x,y)




%%   plot 3D

x=linspace(-1,1,100);
y=linspace(-1,1,100);
z=x.^2+y.^2;

figure
plot3(x,y,z)
grid on
xlabel('x')


%%



