Path: news.mathworks.com!newsfeed-00.mathworks.com!NNTP.WPI.EDU!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!tribune.usask.ca!support1.mathforum.org!not-for-mail
From: lauren_g <lgxlg1@nottingham.ac.uk>
Newsgroups: comp.soft-sys.matlab
Subject: dlmwrite help!
Date: Thu, 08 May 2008 10:38:01 EDT
Organization: The Math Forum
Lines: 15
Message-ID: <21483080.1210257689268.JavaMail.jakarta@nitrogen.mathforum.org>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1210257689 26941 144.118.30.135 (8 May 2008 14:41:29 GMT)
X-Complaints-To: news@support1.mathforum.org
NNTP-Posting-Date: Thu, 8 May 2008 14:41:29 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:467409


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