<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236789</link>
    <title>MATLAB Central Newsreader - Writing variable name and value from matlab workspace</title>
    <description>Feed for thread: Writing variable name and value from matlab workspace</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, 30 Sep 2008 06:30:04 -0400</pubDate>
      <title>Writing variable name and value from matlab workspace</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236789#602946</link>
      <author>SURESH </author>
      <description>Hello Frineds,&lt;br&gt;
&lt;br&gt;
In brief, is it possible to write the variable name and its value from the matlab workspace to an excel file. I know that using &amp;#8220;xlswrite&amp;#8221; command, we can write the values from the workspace to an excel file. But I would like to know whether I can write the variable name as well.&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Suresh.</description>
    </item>
    <item>
      <pubDate>Tue, 30 Sep 2008 14:13:38 -0400</pubDate>
      <title>Re: Writing variable name and value from matlab workspace</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236789#603021</link>
      <author>Walter Roberson</author>
      <description>SURESH wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt; In brief, is it possible to write the variable name and its value from the &lt;br&gt;
&amp;gt; matlab workspace to an excel file. I know that using &amp;#8220;xlswrite&amp;#8221;&lt;br&gt;
&amp;gt; command, we can write the values from the workspace to an excel file. But I&lt;br&gt;
&amp;gt; would like to know whether I can write the variable name as well.&lt;br&gt;
&lt;br&gt;
Only by converting the name into a value and writing it along with the other&lt;br&gt;
values.&lt;br&gt;
&lt;br&gt;
If you are using xlswrite() under MS Windows you can (I gather)&lt;br&gt;
write fairly sophisticated files, but under any of the other operating systems&lt;br&gt;
-effectively- in order to write a string as part of the data, you have to&lt;br&gt;
convert *everything* to text before-hand, including putting in all&lt;br&gt;
of the cell delimeters as part of the created text, and write out the text using&lt;br&gt;
dlmwrite() with the cell delimeter set to the empty string.</description>
    </item>
    <item>
      <pubDate>Wed, 01 Oct 2008 05:28:01 -0400</pubDate>
      <title>Re: Writing variable name and value from matlab workspace</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236789#603133</link>
      <author>SURESH </author>
      <description>Walter Roberson &amp;lt;roberson@hushmail.com&amp;gt; wrote in message &amp;lt;%tqEk.2561$i84.1493@newsfe10.iad&amp;gt;...&lt;br&gt;
&amp;gt; SURESH wrote:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; In brief, is it possible to write the variable name and its value from the &lt;br&gt;
&amp;gt; &amp;gt; matlab workspace to an excel file. I know that using &amp;#8220;xlswrite&amp;#8221;&lt;br&gt;
&amp;gt; &amp;gt; command, we can write the values from the workspace to an excel file. But I&lt;br&gt;
&amp;gt; &amp;gt; would like to know whether I can write the variable name as well.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Only by converting the name into a value and writing it along with the other&lt;br&gt;
&amp;gt; values.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If you are using xlswrite() under MS Windows you can (I gather)&lt;br&gt;
&amp;gt; write fairly sophisticated files, but under any of the other operating systems&lt;br&gt;
&amp;gt; -effectively- in order to write a string as part of the data, you have to&lt;br&gt;
&amp;gt; convert *everything* to text before-hand, including putting in all&lt;br&gt;
&amp;gt; of the cell delimeters as part of the created text, and write out the text using&lt;br&gt;
&amp;gt; dlmwrite() with the cell delimeter set to the empty string.&lt;br&gt;
&lt;br&gt;
Hello Roberson,&lt;br&gt;
Thanks for the reply.&lt;br&gt;
Actually I'm working on MS Windows operating system. Could you please let me know how to convert the variable name as a value so that I can write both the name and value of the variable to an excel file. &lt;br&gt;
Currently I'm usinf active server to invoke an excel server then using the DDE command I'm pring the results to the excel file.&lt;br&gt;
&lt;br&gt;
Any help in this is highly appreciated...&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Suresh.</description>
    </item>
    <item>
      <pubDate>Wed, 01 Oct 2008 05:46:01 -0400</pubDate>
      <title>Re: Writing variable name and value from matlab workspace</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/236789#603134</link>
      <author>Shanmugam Kannappan</author>
      <description>Hello,&lt;br&gt;
try this,&lt;br&gt;
&lt;br&gt;
I think this will work for u.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
var1=20;&lt;br&gt;
xlswrite('X1.xlsx',[{'var1'};var1])&lt;br&gt;
&lt;br&gt;
Shan...&lt;br&gt;
&lt;br&gt;
&quot;SURESH &quot; &amp;lt;sureshkumarg@infotechsw.com&amp;gt; wrote in message &amp;lt;gbsh1c$luc$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello Frineds,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; In brief, is it possible to write the variable name and its value from the matlab workspace to an excel file. I know that using &amp;#8220;xlswrite&amp;#8221; command, we can write the values from the workspace to an excel file. But I would like to know whether I can write the variable name as well.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; Suresh.</description>
    </item>
  </channel>
</rss>

