Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: print a matrix ...
Date: Thu, 22 Oct 2009 21:24:19 +0000 (UTC)
Organization: Validatics LLC
Lines: 5
Message-ID: <hbqii3$7fk$1@fred.mathworks.com>
References: <hbopub$1m3$1@fred.mathworks.com> <hbpo85$dbn$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1256246659 7668 172.30.248.35 (22 Oct 2009 21:24:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 22 Oct 2009 21:24:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2036538
Xref: news.mathworks.com comp.soft-sys.matlab:579451


Thanks Steve, Allan and Branko,

Many thanks for your help. Followed Allan's code and it worked. Also found that the function 'dlmwrite' worked perfectly for my needs:

dlmwrite(outfile, MATRIX, 'delimiter', ' ', 'precision', '%8.2f', '-append', 'newline', 'pc');