matrix sample