Path: news.mathworks.com!not-for-mail
From: "ragab Rabeiy" <r_rabeiy@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: xlswrite
Date: Thu, 15 Oct 2009 16:59:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 28
Message-ID: <hb7kcp$l5q$1@fred.mathworks.com>
References: <hb6s4f$evt$1@fred.mathworks.com> <hb7104$dus$1@fred.mathworks.com> <6d40011a-0172-4478-b67c-04c9e03d6aac@a31g2000yqn.googlegroups.com>
Reply-To: "ragab Rabeiy" <r_rabeiy@yahoo.com>
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 1255625945 21690 172.30.248.35 (15 Oct 2009 16:59:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 15 Oct 2009 16:59:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2041704
Xref: news.mathworks.com comp.soft-sys.matlab:577615


ImageAnalyst <imageanalyst@mailinator.com> wrote in message <6d40011a-0172-4478-b67c-04c9e03d6aac@a31g2000yqn.googlegroups.com>...
> ragab Rabeiy
> Just use sprintf() to create a brand new filename each iteration of
> the loop and then write out that uniquely-named file, rather than
> overwriting the same file ("test.xls") each time.  For example
> 
> baseFileName = sprintf('Test %d.xls', j);
> folder = 'c:\my output folder';
> if ~exist(folder, 'dir')
>     mkdir(folder);
> end
> fullFileName = fullfile(folder, baseFileName);
> xlswrite(fullFileName);
> 
> Regards,
> ImageAnalyst

thank you ImageAnalyst,
your example seems to be helpful, but i can not understand it. I tried it many times but gave may error also. could you please write a simple one , by which i can make copy and past in command window and it works directly, like

????
for n=1:5,
m=n*pi
end
xlaswrite.......????

regards
ragab