clear all
lambda1=2;
lambda2=2;
c=340;
a1=1;
a2=1;
k1=2*pi/lambda1;
k2=2*pi/lambda2;
omega1=c*k1;
omega2=c*k2;
x=0:0.05:5;
t=0:2e-4:5e-3;
[X,T]=meshgrid(x,t);
s1=a1*sin(omega1*T-k1*X);
s2=a2*sin(omega2*T-k2*X+0);%Sista termen anger fasskillnaden
noll=zeros(1,101);
for q=1:size(t,2);
plot3(x,s1(q,:),noll,'b',x,noll,s2(q,:),'r',x,s1(q,:),s2(q,:),'g',0,a1,a2,'g',0,-a1,-a2,'g');
grid
pause(0.5)
end
