-2
$\begingroup$

How to construct a code that superimpose n=10 one dimensional sinuisodal waves. each with an angular frequency ωi(*i is subscript*) and wave number ki to form a wave pulse.Each angular frequency ωi and wave number kidiffers slightly from the previous one only by a small fraction, namely. Δω=|ωi+1-ωi|<<ωi Δk=|ki+1-ki|<<ki

i plan to Manipulate[] the simulation for n=50 waves. i would like to see the difference in the wavepulse composed of n=50 and n=10 waves. this is what have been construct so far.

A1 = 1; k1 = 4; ω = 2; A2 = 5; ω2 = 10; k2 = 3
y1[x_, t_] := A1*Sin[k1*x - ω*t];
y2[x_, t_] := (A2*Sin[k2*x - ω2*t]);
Plot[{y1[x, t = 0.5], y2[x, t = 0.5]}, {x, -10, 10}]

Manipulate[
 Plot[{y1[x, t = n] + y2[x, t = n]}, {x, -10, 10}, 
  PlotRange -> All], {n, 0, 100, 0.25}]
$\endgroup$
1
$\begingroup$
angularrate = Range[10];
amplitude = RandomReal[{.1, 1}, 10];
Animate[Plot[
  Evaluate@Table[amplitude[[i]] Sin[angularrate[[i]] t - x], {i, 10}], 
  {x, 0, 10},
  PlotStyle -> Table[Hue[j/10], {j, 10}],
  ColorFunctionScaling -> True], 
  {t, 0, 10},
  AnimationRate -> .1]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.