www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/WriteTabDelimitedDataandSpecifyPrecisionExample.m
%% 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')