MAT #MINDIFF(C,A,B) computes minimal difference C of m x n matrices of A=[A1,A2,...,An] and B=[B1,B2,...,Bn] by selecting constants s1,s2,..,sn (each either 1 or -1) so that the sum of squares of the elements of C=[A1-s1*B1,A2-s1*B2,...,An-sn*Bn] is as small as possible. A = More about additional MAT #operations M = More about MAT operations