<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173640</link>
    <title>MATLAB Central Newsreader - putting together &quot;cell&quot; and &quot;double&quot;</title>
    <description>Feed for thread: putting together &quot;cell&quot; and &quot;double&quot;</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>Fri, 01 Aug 2008 18:13:03 -0400</pubDate>
      <title>putting together &quot;cell&quot; and &quot;double&quot;</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173640#446825</link>
      <author>Anna Chen</author>
      <description>hello,&lt;br&gt;
i have a file that contains a data table, with data and the &lt;br&gt;
header names.  when i use xlsread, the data part gets put &lt;br&gt;
as &quot;double,&quot; but the header names all get put into &quot;cell&quot; &lt;br&gt;
format, and i can't figure out how to splice the two &lt;br&gt;
together.  can anyone help?&lt;br&gt;
&lt;br&gt;
i guess basically, if i have something like &quot;dwe ewrwe ere&quot; &lt;br&gt;
that is in cell format, and i want to put it over &quot; 1 3 4&quot; &lt;br&gt;
which are numbers to get&lt;br&gt;
&lt;br&gt;
dwe ewrwe ere&lt;br&gt;
1    3     4&lt;br&gt;
&lt;br&gt;
how would i do that?  &lt;br&gt;
&lt;br&gt;
thanks!</description>
    </item>
    <item>
      <pubDate>Fri, 01 Aug 2008 19:09:02 -0400</pubDate>
      <title>Re: putting together</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173640#446832</link>
      <author>Scott Burnside</author>
      <description>&quot;Anna Chen&quot; &amp;lt;icedredtea@yahoo.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;g6vjne$68m$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; hello,&lt;br&gt;
&amp;gt; i have a file that contains a data table, with data and &lt;br&gt;
the &lt;br&gt;
&amp;gt; header names.  when i use xlsread, the data part gets &lt;br&gt;
put &lt;br&gt;
&amp;gt; as &quot;double,&quot; but the header names all get put &lt;br&gt;
into &quot;cell&quot; &lt;br&gt;
&amp;gt; format, and i can't figure out how to splice the two &lt;br&gt;
&amp;gt; together.  can anyone help?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; i guess basically, if i have something like &quot;dwe ewrwe &lt;br&gt;
ere&quot; &lt;br&gt;
&amp;gt; that is in cell format, and i want to put it over &quot; 1 3 &lt;br&gt;
4&quot; &lt;br&gt;
&amp;gt; which are numbers to get&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; dwe ewrwe ere&lt;br&gt;
&amp;gt; 1    3     4&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; how would i do that?  &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; thanks!&lt;br&gt;
&lt;br&gt;
Anna,&lt;br&gt;
&lt;br&gt;
Does your data look like this?:&lt;br&gt;
&lt;br&gt;
Symbol, Exchange, Date, Time, Bid&lt;br&gt;
CMGI, ARCA, 20040901, 9:31:33, 1.99&lt;br&gt;
GE, ISLAND, 20040901, 9:31:34, 34.63&lt;br&gt;
QQQQ, AUTO, 20040901, 9:31:35, 35.13&lt;br&gt;
&lt;br&gt;
That is, do you have a delimited headerline? Is the data a &lt;br&gt;
mix of numeric and text columns?&lt;br&gt;
&lt;br&gt;
If so, you can take a look at autodataread.m in the File &lt;br&gt;
Exchange.&lt;br&gt;
&lt;br&gt;
Scott</description>
    </item>
    <item>
      <pubDate>Fri, 01 Aug 2008 19:16:41 -0400</pubDate>
      <title>Re: putting together &quot;cell&quot; and &quot;double&quot;</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173640#446834</link>
      <author>Peter Perkins</author>
      <description>Anna Chen wrote:&lt;br&gt;
&amp;gt; hello,&lt;br&gt;
&amp;gt; i have a file that contains a data table, with data and the &lt;br&gt;
&amp;gt; header names.  when i use xlsread, the data part gets put &lt;br&gt;
&amp;gt; as &quot;double,&quot; but the header names all get put into &quot;cell&quot; &lt;br&gt;
&amp;gt; format, and i can't figure out how to splice the two &lt;br&gt;
&amp;gt; together.  can anyone help?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; i guess basically, if i have something like &quot;dwe ewrwe ere&quot; &lt;br&gt;
&amp;gt; that is in cell format, and i want to put it over &quot; 1 3 4&quot; &lt;br&gt;
&amp;gt; which are numbers to get&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; dwe ewrwe ere&lt;br&gt;
&amp;gt; 1    3     4&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; how would i do that?  &lt;br&gt;
&lt;br&gt;
Anna, if you have access to the Statistics Toolbox, the dataset array may be what you are looking for:&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; dwe = 1; ewrwe = 3; ere = 4;&lt;br&gt;
&amp;gt;&amp;gt; ds = dataset(dwe,ewrwe,ere)&lt;br&gt;
ds = &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dwe    ewrwe    ere&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1      3        4  &lt;br&gt;
&lt;br&gt;
and it is possible to read data in the format you describe directly from an Excel file, along with the column names, into a dataset array.  It is really intended more for putting data of different types together into a single array, and is probably overkill for scalar values like that, but you may find it helpful.  An alternative for your specific example might be &lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; struct('dwe',1,'ewrwe',3,'ere',4)&lt;br&gt;
ans = &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dwe: 1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ewrwe: 3&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ere: 4</description>
    </item>
    <item>
      <pubDate>Fri, 01 Aug 2008 19:17:39 -0400</pubDate>
      <title>Re: putting together &quot;cell&quot; and &quot;double&quot;</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173640#446835</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;g6vjne$68m$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
Anna Chen &amp;lt;icedredtea@yahoo.com&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt;i have a file that contains a data table, with data and the &lt;br&gt;
&amp;gt;header names.  when i use xlsread, the data part gets put &lt;br&gt;
&amp;gt;as &quot;double,&quot; but the header names all get put into &quot;cell&quot; &lt;br&gt;
&amp;gt;format, and i can't figure out how to splice the two &lt;br&gt;
&amp;gt;together.  can anyone help?&lt;br&gt;
&lt;br&gt;
&amp;gt;i guess basically, if i have something like &quot;dwe ewrwe ere&quot; &lt;br&gt;
&amp;gt;that is in cell format, and i want to put it over &quot; 1 3 4&quot; &lt;br&gt;
&amp;gt;which are numbers to get&lt;br&gt;
&lt;br&gt;
&amp;gt;dwe ewrwe ere&lt;br&gt;
&amp;gt;1    3     4&lt;br&gt;
&lt;br&gt;
Is that for display purposes only (that is, you are expecting to&lt;br&gt;
get a character output that happens to have that format), or are&lt;br&gt;
you hoping to somehow get a single matrix that contains the strings&lt;br&gt;
as column headers but also has pure numeric values for the columns?&lt;br&gt;
It isn't too bad to do for display purposes, but in Matlab&lt;br&gt;
numeric matrices cannot have character headers.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&quot;I will not approve any plan which is based on the old principle&lt;br&gt;
&amp;nbsp;&amp;nbsp;of build now and repair later.&quot;                   -- Walter Hickle</description>
    </item>
  </channel>
</rss>

