output fp matrix to txt