This is simplified rewrite of LatticeKrig package on Cartesian geometry.
Both R and MATLAB codes can be used for perform spatial modeling for scalar and vector fields, but R codes are more efficient by a better design of the sparse matrix decomposition.
R codes can be used for real applications and MATLAB codes are suitable for demonstration purposes.