<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/121159</link>
    <title>MATLAB Central Newsreader - Names of Variables stored in other variables</title>
    <description>Feed for thread: Names of Variables stored in other variables</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>Sun, 02 Apr 2006 23:25:50 -0400</pubDate>
      <title>Names of Variables stored in other variables</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/121159#306030</link>
      <author>nissan.aloni@intel.com</author>
      <description>hi,&lt;br&gt;
&lt;br&gt;
can i refer to a variable whos name is stored in another varialbe?&lt;br&gt;
&lt;br&gt;
e.g. :&lt;br&gt;
MyVar = [1 1 1];&lt;br&gt;
a = 'MyVar';&lt;br&gt;
&lt;br&gt;
Can i get to the values stored in MyVar using only the &quot;a&quot; variable?&lt;br&gt;
&lt;br&gt;
thanks</description>
    </item>
    <item>
      <pubDate>Mon, 03 Apr 2006 04:35:17 -0400</pubDate>
      <title>Re: Names of Variables stored in other variables</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/121159#306041</link>
      <author>French Caro</author>
      <description>Hi,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Can i get to the values stored in MyVar using only the &quot;a&quot;&lt;br&gt;
&amp;gt; variable?&lt;br&gt;
&amp;gt;&lt;br&gt;
Yes you can but it is not recommended :&lt;br&gt;
help eval&lt;br&gt;
example :&lt;br&gt;
value2 = eval([a,'(2)']);&lt;br&gt;
&lt;br&gt;
Caroline</description>
    </item>
    <item>
      <pubDate>Mon, 03 Apr 2006 01:30:36 -0400</pubDate>
      <title>Re: Names of Variables stored in other variables</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/121159#306042</link>
      <author>David Mackenzie</author>
      <description>Caroline is right.  You might want to consider changing your&lt;br&gt;
application to make use of MATLAB structures - their fields can be&lt;br&gt;
accessed dynamically by name (see &quot;Programming and Data Types:&lt;br&gt;
Structures and Cell Arrays: Accessing Data in Structure Arrays&quot; in the&lt;br&gt;
MATLAB help).&lt;br&gt;
&lt;br&gt;
David</description>
    </item>
  </channel>
</rss>

