4 views (last 30 days)

clc

clear all

A=1;

T=4;

L=12;

syms t

t=0:1:20;

x=-300:10:300;

H=A*cos(2*pi*t/(T)-2*pi*x/(L))

for k=1:length(t)

plot(t(k),H(k),'+')

axis([-0.5 20.5 -2 2])

pause(0.25)

end

BALAJI KARTHEEK
on 20 Apr 2020

clc

clear all

A=1;

T=4;

L=12;

syms t

t=0:(((300-(-300))/10)^-1)*20:20;

x=-300:10:300;

H=A*cos(2*pi*t/(T)-2*pi*x/(L));

for k=1:length(t)

plot(t(k),H(k),'*')

axis([-0.5 20.5 -2 2])

pause(0.25)

end

To evaluate H t and x array length must be same, and rest all wil be same... u will get the graph as a dynamic one, varying with respect to time thats it,,

Opportunities for recent engineering grads.

Apply TodayFind the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
## 3 Comments

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/519239-how-to-create-animation-of-wave-pattern-h-x-y-t-acos-2-pi-t-t-2-pi-x-l-with-t-4s-l-12m-300#comment_831400

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/519239-how-to-create-animation-of-wave-pattern-h-x-y-t-acos-2-pi-t-t-2-pi-x-l-with-t-4s-l-12m-300#comment_831400

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/519239-how-to-create-animation-of-wave-pattern-h-x-y-t-acos-2-pi-t-t-2-pi-x-l-with-t-4s-l-12m-300#comment_831480

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/519239-how-to-create-animation-of-wave-pattern-h-x-y-t-acos-2-pi-t-t-2-pi-x-l-with-t-4s-l-12m-300#comment_831480

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/519239-how-to-create-animation-of-wave-pattern-h-x-y-t-acos-2-pi-t-t-2-pi-x-l-with-t-4s-l-12m-300#comment_831482

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/519239-how-to-create-animation-of-wave-pattern-h-x-y-t-acos-2-pi-t-t-2-pi-x-l-with-t-4s-l-12m-300#comment_831482

Sign in to comment.