Initial MAPA coding done! Now for more data loading and testing...
found bug in lmsvd.m simplified version. sometimes there are less singular values than D. fixed both in lmsvd.m and in LMsvd.h