WAVE
Consider a traveling transverse wave on a string. Consider the string to have a single spatial dimension. Consider this wave as traveling
- in the
direction in space. E.g., let the positive
direction be to the right, and the negative
direction be to the left.
- with constant amplitude
- with constant velocity
, where
is
- independent of wavelength
- independent of amplitude
- with constant waveform, or shape
more generally, by
representing two component wave forms
These waves has always been problem while studying such theories. Let you all guys have practical experience of waves with MATLAB.
Propagating Wave:
k = 5;
w = 5;
dx = 0.05;
x = 0:dx:4;
dt = 0.05;
t = 1:dt:10;
A = 1;
for j=1:length(t)
for i=1:length(x)
y(j) = A * sin(k.* x(i) - w.*t(j));
end
pause (0.1)
plot(y)
axis([1,100,-2,2])
grid
end
Standing Wave:
k = 5;
w = 5;
dx = 0.05;
x = 0:dx:4;
dt = 0.05;
t = 1:dt:10;
A = 1;
for j=1:length(t)
for i=1:length(x)
y(i) = A * sin(k.* x(i)).* cos(w.*t(j));
end
pause (0.1)
plot(y)
axis([1,100,-2,2])
grid
end
Attenuated Wave:
k = 5;
w = 5;
dx = 0.05;
x = 0:dx:4;
dt = 0.05;
t = 1:dt:10;
A = 6;
for j=1:length(t)
for i=1:length(x)
y(i) = A* exp(-t(j)) * sin(k.* x(i) - w.*t(j));
end
pause (0.1)
plot(y)
axis([1,100,-2,2])
grid
end
Let you try all these codes in MATLAB to get the feeling of wave.
Let you check the Real time Amplitude modulated wave on ....
ReplyDeletehttp://amplitudemodulationwithmatlab.blogspot.in/