clear;
pi = 3.14159;
A1 = 5;
A2 = 5;
w1 = 1.0;
w2 = 1.50;
phi1 = 0.0;
phi2 = 0.0;
//phi2 = pi/2.0;

for i = 1 : 2000
 t = i*0.02;
 x(i) = t;
 y1(i) = A1*cos(w1*t + phi1);
 y2(i) = A2*cos(w2*t + phi2);
end

clf; 
plot(x, y1, 'r.', x, y2, 'b-', x, y1+y2, 'k.');

