User Tools

Site Tools


wiki:mathematica

Mathematica code

When copy-pasting this code, remember that the → arrows will not copy-paste correctly into Mathematica.

DensityPlot[x*y, {x, 0, 10}, {y, 0, 20}, ColorFunction → “SunsetColors”]

Guitar string animations

Animate[Plot[Sin[t] Sin[x], {x, -1, 12}, PlotRange → {-1.2, 1.2}], {t, 0, 2*Pi}]

Animate[Plot[Sin[2*628*t] Sin[2*Pi*x], {x, -0.5, 1.5}, PlotRange → {-1.2, 1.2}], {t, 0, .01}]

Animate[Plot[Sin[t] Sin[x] + 0.15*Sin[7 t] Sin[7 x], {x, -1, 4}, PlotRange → {-1.2, 1.2}], {t, 0, 2*Pi}]

Quantum Harmonic Oscillator Plots

Plot[{(1/Pi^0.25) Exp[-(x^2)/2], (1/Pi^0.25) Cos[2 Pi x/6.3]}, {x, -6, 6}]

Plot[{(1/Pi^0.25) Sqrt[2] x Exp[-(x^2)/2], 0.65 Sin[2 Pi x/6.3]}, {x, -6, 6}]

Plot[{(1/Pi^0.25) (1/Sqrt[2]) (2 x^2 - 1) Exp[-(x^2)/2], -0.53 Cos[2 Pi x/6.3]}, {x, -6, 6}]

Plot[{(1/Pi^0.25) (1/Sqrt[3]) (2 x^3 - 3 x) Exp[-(x^2)/2], -0.5 Sin[2 Pi x/6.3]}, {x, -6, 6}]

wiki/mathematica.txt · Last modified: 2019/02/21 12:36 by ethanminot