RosettaCodeData/Task/Write-float-arrays-to-a-text-file/MATLAB/write-float-arrays-to-a-text-file.m
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

6 lines
183 B
Matlab

x = [1, 2, 3, 1e11];
y = [1, 1.4142135623730951, 1.7320508075688772, 316227.76601683791];
fid = fopen('filename','w')
fprintf(fid,'%.3g\t%.5g\n',[x;y]);
fclose(fid);