figure;
t=linspace(0, 2*pi, 360);
plot(t, sin(t));
hold on
plot(t, cos(t), '--r');
xlabel('Time(s)');
ylabel('Function values');
title('Sin and Cos functions');
legend('sin', 'cos');
xlim([0, 2*pi]);
ylim([-1.4, 1.4]);
