clear all; close all;
A = 1;
phi = pi/6.0;
omega1 = 2.0 * pi;
omega2 = 4.0 * pi;
omega3 = 8.0 * pi;
t = 0:0.001:2;
x0 = A * sin( omega1 * t + phi);
x1 = A * sin( omega1 * t + phi);
x2 = A * sin( omega2 * t + phi);
x3 = A * sin( omega3 * t + phi);
figure(1);
plot(t,x0);
xlim([0,2.0])
xticks([0 0.5 1.0 1.5 2.0])
yticks([-1.0 -0.5 0 0.5 1.0])
grid;
xlabel('time t [s]');
ylabel('x(t)');
figure(2);
plot(t,x1,'-b',t,x2,'-g',t,x3,'-r');
xlim([0,1.0])
xticks([0 0.5 1.0 1.5 2.0])
yticks([-1.0 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1.0])
grid;
xlabel('time t [s]');
ylabel('x(t)');
legend('ω=2π','ω=4π','ω=8π');