%% Write Tab-Delimited Data and Specify Precision
% Create an array of sample data, M.

M = magic(3)*pi

%
% Write matrix M to a file, 'myFile.txt', delimited by the tab character and using a precision of 3 significant digits.

dlmwrite('myFile.txt',M,'delimiter','\t','precision',3)

%
% View the data in the file.

type('myFile.txt')

% Copyright 2012 The MathWorks, Inc.