Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!s9g2000prm.googlegroups.com!not-for-mail
From: Praetorian <ashish.sadanandan@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: num2cellstr
Date: Tue, 28 Oct 2008 14:23:47 -0700 (PDT)
Organization: http://groups.google.com
Lines: 21
Message-ID: <f3b6c6b8-6c3a-4610-ad63-200d0da58072@s9g2000prm.googlegroups.com>
References: <eb6328b2-f07e-44c5-a225-f9ea5bee1408@u29g2000pro.googlegroups.com>
NNTP-Posting-Host: 66.37.129.66
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1225229027 22549 127.0.0.1 (28 Oct 2008 21:23:47 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 28 Oct 2008 21:23:47 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: s9g2000prm.googlegroups.com; posting-host=66.37.129.66; 
	posting-account=uxNuEQoAAABwxsrGxAKeLxAj2hdO1tck
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) 
	Gecko/2008092417 Firefox/3.0.3,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:497706


On Oct 28, 2:21=A0pm, Jason S <jmsa...@gmail.com> wrote:
> is there a function that converts an array of numbers to a cell array
> of strings?
> num2cell converts array of numbers -> cell array of numbers
> num2str converts array of numbers -> char array (but not cell array)
>
> I suppose I can do this easily, it just seems like an obvious idea for
> a builtin function

AFAIK there is no single function that can do this but as you said
it's easy enough to create your own:

>> data =3D num2cell([1:5]);
>> data =3D cellfun(@num2str,data,'UniformOutput',false)

data =3D

    '1'    '2'    '3'    '4'    '5'

HTH,
Ashish.