Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed.cs.wisc.edu!uwm.edu!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: string extra character?
Date: Fri, 18 Jul 2008 22:20:58 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 15
Message-ID: <g5r50a$7ro$1@canopus.cc.umanitoba.ca>
References: <g5r3jd$s4u$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1216419658 8056 192.70.172.160 (18 Jul 2008 22:20:58 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Fri, 18 Jul 2008 22:20:58 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:480396



In article <g5r3jd$s4u$1@fred.mathworks.com>,
ching l <chinglnc@hotmail.com> wrote:
>a= 80;
>csvwrite(num2str(a), [2]);

>the result = 80.dat

>what can I do so that the file name can be 80_1?

csvwrite(num2str(a,'%d_1.dat'),[2]);
-- 
  "If there were no falsehood in the world, there would be no
  doubt; if there were no doubt, there would be no inquiry; if no
  inquiry, no wisdom, no knowledge, no genius."
                                              -- Walter Savage Landor