**fem1d_sample_test**,
a MATLAB code which
calls fem1d_sample(), which
evaluates a finite element function of one argument.

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

fem1d_sample, a MATLAB code which samples a scalar or vector finite element function of one variable, defined by FEM files, returning interpolated values at the sample points.

- fem1d_sample_test.m calls all the tests.
- fem1d_sample_test.sh runs all the tests.
- fem1d_sample_test.txt the output file.

**P1** is FEM data for the vector function f(x)=[ 1, x, x^2], on a grid of 11
evenly spaced nodes from -5 to 5, using piecewise constant basis functions.

- p1_fem_nodes.txt, the FEM nodes.
- p1_fem_elements.txt, the FEM elements.
- p1_fem_values.txt, the FEM nodal values.
- p1_sample_nodes.txt, the sample nodes.
- p1_sample_values.txt, the sample nodal values.

**P2** is FEM data for the vector function f(x)=[ 1, x, x^2], on a grid of 11
evenly spaced nodes from -5 to 5, using piecewise linear basis functions.

- p2_fem_nodes.txt, the FEM nodes.
- p2_fem_elements.txt, the FEM elements.
- p2_fem_values.txt, the FEM nodal values.
- p2_sample_nodes.txt, the sample nodes.
- p2_sample_values.txt, the sample nodal values.