Added matrix construction with data pointer.