Written specifically in Freemat, but these should be fully portable to Matlab or Octave.