Download the MATLAB code and test DATA from the following link:
You may also generate your own test data by running driverpufe1d.m in
1D-SPECTRAL-PUFE.zip(written by N. Sukumar).
In the example, the differetial equation for a one-dimensional harmonic oscillator
- ½ ψ"(x) + x2 ψ(x) = E ψ(x)
is discretized by partition of unit finite element method or linear/quadratic/cubic finite element.
With your own input parameters, a file HS.mat will be generated after each run of driverpufe1d.m.
And the coefficient matrices H and S are stored in this mat file.