Matrix Operator Extraction Toolkit - Tools to obtain the matrix form of common MATLAB linear operations (e.g. trapz, interp) performed over a 1-D or 2-D grid as generated in ndgrid. This solution is ...
I apologise that the link given in that paper is no longer active. I still get requests for this code, so I thought I'd make it available here. I’m surprised no one else has made open-source code ...