How can I save (stationary or dynamical) expectation values?
The WavePacket scripts qm_bound.m and qm_bound.m calculate expectation values of a choice of elementary operators for each bound state or for each time step, respectively. The resulting sequences can be found in the respective log files and they are also displayed in various plots. If, in addition, you want them to be stored in additional files, you should issue, e. g., the following Matlab commands upon running qm_propa.m: data(:,1)=time.main.grid; data(:,2)=expect.ind.kin{1,1}; save (‘-ascii’, ‘expect.mat’, ‘data’); which would create a two-column ASCII file containing the time-dependence of the kinetic energy w.r.t. the first component of the wavefunction resulting from the solution of (coupled) time-dependent Schrödinger equations.