**fem1d_approximate**,
a MATLAB code which
uses a given finite element mesh and piecewise linear basis functions
to approximate a set of data points,
while controlling the variation in the derivative.

A least-squares approach is used. The user can supply weights to the approximation, derivative, and boundary conditions.

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

**fem1d_approximate** is available in
a MATLAB version.

fem1d_bvp_linear, a MATLAB code which applies the finite element method (FEM), with piecewise linear elements, to a two point boundary value problem (BVP) in one spatial dimension, and compares the computed and exact solutions with the L2 and seminorm errors.

fem1d_project, a MATLAB code which projects data into a finite element method (FEM) space, including the least squares approximation of data, or the projection of a finite element solution from one mesh to another.

- data_bracket.m brackets data between successive entries of a sorted vector.
- fem1d_approximate.m, approximates data with a finite element function.
- r8vec_print.m, prints an R8VEC.
- r8vec2_print.m, prints an R8VEC2.
- s_escape_tex.m, de-escapes TeX escape sequences.