Path: news.mathworks.com!not-for-mail
From: "Barry Williams" <barry.r.williamsnospam@saic.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: dlmwrite help!
Date: Thu, 8 May 2008 19:00:25 +0000 (UTC)
Organization: SAIC
Lines: 45
Message-ID: <fvvik9$fu$1@fred.mathworks.com>
References: <21483080.1210257689268.JavaMail.jakarta@nitrogen.mathforum.org>
Reply-To: "Barry Williams" <barry.r.williamsnospam@saic.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210273225 510 172.30.248.38 (8 May 2008 19:00:25 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 8 May 2008 19:00:25 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 804417
Xref: news.mathworks.com comp.soft-sys.matlab:467474


I'm not sure that I've got the answer to your question, 
but here's a bit more info that may make the problem 
murkier.

How are you looking at the file you create?  When I open 
it in Notepad, all I see are boxes.  When I save to 
name.txt (with everything else left the same as you wrote 
it) and either type name.txt in MatLab or open in Excel, I 
see the single integers values that I have wrriten to 
name.txt.

Barry

lauren_g <lgxlg1@nottingham.ac.uk> wrote in message 
<21483080.1210257689268.JavaMail.jakarta@nitrogen.mathforum
.org>...
> Hi,
> 
> I am a matlab novice so please excuse me if my question 
is silly!
> 
> I have a variable I am trying to save as an ASCII.  The 
variable is double precision and each case only takes one 
of two values.  I initially created this variable with 
each case taking either the value of '0' or '255' (for 
imagery purposes).  I saved it using the following command 
which worked fine:
> 
> dlmwrite
('name.asc',E,'delimiter','\t','precision','%.0f')
> 
> However, the program I wish to import the ASCII into 
needs the values to be between 0 and 9 (the actual values 
do not matter, so long as they are single digits).  When I 
have tried creating the variable so all cases have single 
digit values (e.g. all '0' or '1', or all '8' and '9') and 
saved this using the same command as above the ASCII 
created does not contain any numeric values - just boxes!  
> 
> Does anyone know why this is?
> 
> many thanks
> 
> Lauren