I'm trying to animate plot:
a, A, B and C are constants. So I wrote the following script:
a:=1;
E1:=1.6*10^(-19);
E2:=1.6*10^(-19);
E3:=1.6*10^(-19);
h = 6.63*10^-34;
f[x_,t_] = (Sqrt[a]/2) (((10/16) Sin[Pi (x/a)])/E^(I (E1 (t/h)))
- ((5/16) Sin[3 Pi (x/a)])/E^(I (E2 (t/h)))
+ ((1/16) Sin[5 Pi (x/a)])/E^(I (E3 (t/h))));
Animate[Plot[f[x,t],{x,0,a}, Filling ->Bottom, AxesLabel ->Automatic],
{t,0,100, 1},AnimationRunning->False]
I get empty graph. Okay, maybe my function is not right, so I've tried f[x_,t_] = Sin(x*t);
And again, the graph is empty. What am I doing wrong?
h
and also as @CarlWoll pointed, usef[x,t]
insidePlot
. Also make suref[x,t]
returns real value. $\endgroup$hbar = UnitConvert@Quantity[None, "PlanckConstant"]
if you want to use its numerical value. $\endgroup$h isn't defined as Planck constant?
Mathematica does not know thath
is supposed to be Planck constant. You can do?h
to find out. Also, if it were, Mathematica usesUpperCase
for such things. $\endgroup$