Code
%%// Spread out B to the third dimension so that the singleton
%%// second dimension thus created could be used with bsxfun for expansion in
%%// that dimension
t1 = permute(B,[3 2 1])
%%// Perform row-wise subtraction and then summing of their absolute values
%%// as needed
t2 = sum(abs(bsxfun(@minus,A,t1)),2)
%%// Since the expansion resulted in data in third dimension, we need to
%%// squeeze it back to a 2D data
out = squeeze(t2)'