clear; clc; close all;

x = linspace(0, 2 * pi, 30);
y1 = sin(x);
y2 = cos(x);

figure; hold on; grid on;
plot(x, y1, 'ro--');
plot(x, y2, 'bd:');
xlabel('Time (s)');
ylabel('Amplitude (Volt)');
h = legend({'Input', 'Output'});
set(h, 'Position', [0.5 0.8 0.17 0.1]);

print(gcf, '-depsc', 'pic1.eps');
axis tight;