clear
clc

Amplitude=3;

X=-10:1/100:10;
c=0.5;

Wave(1,1:length(X))=Amplitude.*sin(c*1-X);
for Time=2:10
    
Wave(Time,1:length(X))=Amplitude.*sin(c*Time-X);

end

figure(1);

OriginalWave=Wave(1,1:length(X));
subplot(3,1,1);
plot(X,OriginalWave);
title('The Original Wave [î(x,t)=A*sin(ct-x)]');
ylabel('Amplitude');
grid on

OriginalWave=Wave(2,1:length(X));
subplot(3,1,2);
plot(X,OriginalWave);
title('The Original Wave Propagated By One Unit Time');
ylabel('Amplitude');
grid on

subplot(3,1,3);
PropagationParameter=[1:1:Time];
PropagationEvolution=Wave(PropagationParameter,:);
mesh(X,PropagationParameter,PropagationEvolution);
h1=mesh(X,PropagationParameter,PropagationEvolution);
%set(h,'EdgeColor',[0 0 0]);
set(h1,'MeshStyle','row');
title('The Wave Propagated to The Right');
xlabel('Distance');
ylabel('Time');
zlabel('Amplitude');
hidden off

%========================================================

Amplitude=3;

X=-10:1/100:10;
c=0.5;

% Angular Frequency (Period=1.5708)
AngularFrequency=4;

Wave(1,1:length(X))=Amplitude.*sin(c*1+X);
for Time=2:10
    
Wave(Time,1:length(X))=Amplitude.*sin(c*Time+X);

end

figure(2);

OriginalWave=Wave(1,1:length(X));
subplot(3,1,1);
plot(X,OriginalWave);
title('The Original Wave [î(x,t)=A*sin(ct+x)]');
ylabel('Amplitude');
grid on

OriginalWave=Wave(2,1:length(X));
subplot(3,1,2);
plot(X,OriginalWave);
title('The Original Wave Propagated By One Unit Time');
ylabel('Amplitude');
grid on

subplot(3,1,3);
PropagationParameter=[1:1:Time];
PropagationEvolution=Wave(PropagationParameter,:);
mesh(X,PropagationParameter,PropagationEvolution);
h1=mesh(X,PropagationParameter,PropagationEvolution);
%set(h,'EdgeColor',[0 0 0]);
set(h1,'MeshStyle','row');
title('The Wave Propagated to The Left');
xlabel('Distance');
ylabel('Time');
zlabel('Amplitude');
hidden off

%========================================================

Amplitude=3;

X=-10:1/100:10;
c=0.5;

% Angular Frequency (Period=1.5708)
AngularFrequency=4;

Wave(1,1:length(X))=Amplitude.*sin(X-c*1);
for Time=2:10
    
Wave(Time,1:length(X))=Amplitude.*sin(X-c*Time);

end

figure(3);

OriginalWave=Wave(1,1:length(X));
subplot(3,1,1);
plot(X,OriginalWave);
title('The Original Wave [î(x,t)=A*sin(x-ct)]');
ylabel('Amplitude');
grid on

OriginalWave=Wave(2,1:length(X));
subplot(3,1,2);
plot(X,OriginalWave);
title('The Original Wave Propagated By One Unit Time');
ylabel('Amplitude');
grid on

subplot(3,1,3);
PropagationParameter=[1:1:Time];
PropagationEvolution=Wave(PropagationParameter,:);
mesh(X,PropagationParameter,PropagationEvolution);
h1=mesh(X,PropagationParameter,PropagationEvolution);
%set(h,'EdgeColor',[0 0 0]);
set(h1,'MeshStyle','row');
title('The Wave Propagated to The Right');
xlabel('Distance');
ylabel('Time');
zlabel('Amplitude');
hidden off

%========================================================

Amplitude=3;

X=-10:1/100:10;
c=0.5;

% Angular Frequency (Period=1.5708)
AngularFrequency=4;

Wave(1,1:length(X))=Amplitude.*sin(X+c*1);
for Time=2:10
    
Wave(Time,1:length(X))=Amplitude.*sin(X+c*Time);

end

figure(4);

OriginalWave=Wave(1,1:length(X));
subplot(3,1,1);
plot(X,OriginalWave);
title('The Original Wave [î(x,t)=A*sin(x+ct)]');
ylabel('Amplitude');
grid on

OriginalWave=Wave(2,1:length(X));
subplot(3,1,2);
plot(X,OriginalWave);
title('The Original Wave Propagated By One Unit Time');
ylabel('Amplitude');
grid on

subplot(3,1,3);
PropagationParameter=[1:1:Time];
PropagationEvolution=Wave(PropagationParameter,:);
mesh(X,PropagationParameter,PropagationEvolution);
h1=mesh(X,PropagationParameter,PropagationEvolution);
%set(h,'EdgeColor',[0 0 0]);
set(h1,'MeshStyle','row');
title('The Wave Propagated to The Left');
xlabel('Distance');
ylabel('Time');
zlabel('Amplitude');
hidden off