<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238318</link>
    <title>MATLAB Central Newsreader - num2cellstr</title>
    <description>Feed for thread: num2cellstr</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 28 Oct 2008 20:21:01 -0400</pubDate>
      <title>num2cellstr</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238318#607775</link>
      <author>Jason S</author>
      <description>is there a function that converts an array of numbers to a cell array&lt;br&gt;
of strings?&lt;br&gt;
num2cell converts array of numbers -&amp;gt; cell array of numbers&lt;br&gt;
num2str converts array of numbers -&amp;gt; char array (but not cell array)&lt;br&gt;
&lt;br&gt;
I suppose I can do this easily, it just seems like an obvious idea for&lt;br&gt;
a builtin function</description>
    </item>
    <item>
      <pubDate>Tue, 28 Oct 2008 21:20:04 -0400</pubDate>
      <title>Re: num2cellstr</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238318#607784</link>
      <author>Walter Roberson</author>
      <description>Jason S &amp;lt;jmsachs@gmail.com&amp;gt; wrote in message &amp;lt;eb6328b2-f07e-44c5-a225-f9ea5bee1408@u29g2000pro.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; is there a function that converts an array of numbers to a cell array&lt;br&gt;
&amp;gt; of strings?&lt;br&gt;
&lt;br&gt;
No.&lt;br&gt;
&lt;br&gt;
&amp;gt; num2cell converts array of numbers -&amp;gt; cell array of numbers&lt;br&gt;
&amp;gt; num2str converts array of numbers -&amp;gt; char array (but not cell array)&lt;br&gt;
&lt;br&gt;
cellfun(@num2str,num2cell(TheMatrix),'Uniform',0)</description>
    </item>
    <item>
      <pubDate>Tue, 28 Oct 2008 21:23:47 -0400</pubDate>
      <title>Re: num2cellstr</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238318#607785</link>
      <author>Praetorian</author>
      <description>On Oct 28, 2:21=A0pm, Jason S &amp;lt;jmsa...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; is there a function that converts an array of numbers to a cell array&lt;br&gt;
&amp;gt; of strings?&lt;br&gt;
&amp;gt; num2cell converts array of numbers -&amp;gt; cell array of numbers&lt;br&gt;
&amp;gt; num2str converts array of numbers -&amp;gt; char array (but not cell array)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I suppose I can do this easily, it just seems like an obvious idea for&lt;br&gt;
&amp;gt; a builtin function&lt;br&gt;
&lt;br&gt;
AFAIK there is no single function that can do this but as you said&lt;br&gt;
it's easy enough to create your own:&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; data =3D num2cell([1:5]);&lt;br&gt;
&amp;gt;&amp;gt; data =3D cellfun(@num2str,data,'UniformOutput',false)&lt;br&gt;
&lt;br&gt;
data =3D&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'1'    '2'    '3'    '4'    '5'&lt;br&gt;
&lt;br&gt;
HTH,&lt;br&gt;
Ashish.</description>
    </item>
    <item>
      <pubDate>Tue, 28 Oct 2008 21:27:01 -0400</pubDate>
      <title>Re: num2cellstr</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/238318#607786</link>
      <author>Jos </author>
      <description>Jason S &amp;lt;jmsachs@gmail.com&amp;gt; wrote in message &amp;lt;eb6328b2-f07e-44c5-a225-f9ea5bee1408@u29g2000pro.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; is there a function that converts an array of numbers to a cell array&lt;br&gt;
&amp;gt; of strings?&lt;br&gt;
&amp;gt; num2cell converts array of numbers -&amp;gt; cell array of numbers&lt;br&gt;
&amp;gt; num2str converts array of numbers -&amp;gt; char array (but not cell array)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I suppose I can do this easily, it just seems like an obvious idea for&lt;br&gt;
&amp;gt; a builtin function&lt;br&gt;
&lt;br&gt;
what about:&lt;br&gt;
&lt;br&gt;
data = rand(3,4)&lt;br&gt;
CS = reshape(cellstr(num2str(A(:))),size(A))&lt;br&gt;
&lt;br&gt;
hth&lt;br&gt;
Jos</description>
    </item>
  </channel>
</rss>

