<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173166</link>
    <title>MATLAB Central Newsreader - imag and real don't work</title>
    <description>Feed for thread: imag and real don't work</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>Thu, 24 Jul 2008 11:04:04 -0400</pubDate>
      <title>imag and real don't work</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173166#445124</link>
      <author>Sandra </author>
      <description>I am sure this must be a simple thing, but it is doing my&lt;br&gt;
head in!!! imag and real don't work for me see below:&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; real(0.0116 + 0.3333i)&lt;br&gt;
??? Subscript indices must either be real positive integers&lt;br&gt;
or logicals.&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; real(2+3*i)&lt;br&gt;
??? Subscript indices must either be real positive integers&lt;br&gt;
or logicals.&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; imag(2+3*i)&lt;br&gt;
??? Subscript indices must either be real positive integers&lt;br&gt;
or logicals.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
the last two are from the matlab example! what am I doing wrong?&lt;br&gt;
&lt;br&gt;
any advice appreciated,&lt;br&gt;
sandra</description>
    </item>
    <item>
      <pubDate>Thu, 24 Jul 2008 11:08:03 -0400</pubDate>
      <title>Re: imag and real don't work</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173166#445125</link>
      <author>Dave Brackett</author>
      <description>&quot;Sandra &quot; &amp;lt;smh31.nospam@sussex.ac.uk&amp;gt; wrote in message&lt;br&gt;
&amp;lt;g69nj3$9he$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I am sure this must be a simple thing, but it is doing my&lt;br&gt;
&amp;gt; head in!!! imag and real don't work for me see below:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; real(0.0116 + 0.3333i)&lt;br&gt;
&amp;gt; ??? Subscript indices must either be real positive integers&lt;br&gt;
&amp;gt; or logicals.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; real(2+3*i)&lt;br&gt;
&amp;gt; ??? Subscript indices must either be real positive integers&lt;br&gt;
&amp;gt; or logicals.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; imag(2+3*i)&lt;br&gt;
&amp;gt; ??? Subscript indices must either be real positive integers&lt;br&gt;
&amp;gt; or logicals.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; the last two are from the matlab example! what am I doing&lt;br&gt;
wrong?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Check that you haven't assigned anything to i. i and j&lt;br&gt;
should be reserved for complex numbers. type 'clear i' in&lt;br&gt;
command window and then try again.&lt;br&gt;
dave</description>
    </item>
    <item>
      <pubDate>Thu, 24 Jul 2008 11:13:08 -0400</pubDate>
      <title>Re: imag and real don't work</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173166#445126</link>
      <author>John D'Errico</author>
      <description>&quot;Sandra &quot; &amp;lt;smh31.nospam@sussex.ac.uk&amp;gt; wrote in message &lt;br&gt;
&amp;lt;g69nj3$9he$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I am sure this must be a simple thing, but it is doing my&lt;br&gt;
&amp;gt; head in!!! imag and real don't work for me see below:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; real(0.0116 + 0.3333i)&lt;br&gt;
&amp;gt; ??? Subscript indices must either be real positive integers&lt;br&gt;
&amp;gt; or logicals.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; real(2+3*i)&lt;br&gt;
&amp;gt; ??? Subscript indices must either be real positive integers&lt;br&gt;
&amp;gt; or logicals.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; imag(2+3*i)&lt;br&gt;
&amp;gt; ??? Subscript indices must either be real positive integers&lt;br&gt;
&amp;gt; or logicals.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; the last two are from the matlab example! what am I doing wrong?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; any advice appreciated,&lt;br&gt;
&amp;gt; sandra&lt;br&gt;
&lt;br&gt;
Every single new user does this. They create&lt;br&gt;
a variable with the name of a function they &lt;br&gt;
will later use.&lt;br&gt;
&lt;br&gt;
Have you created variables named imag and&lt;br&gt;
real? What should Matlab do when it sees&lt;br&gt;
variables with that name, but you try to use&lt;br&gt;
the functions of the same names?&lt;br&gt;
&lt;br&gt;
Just for kicks, now create variables named&lt;br&gt;
quit and exit, as well as clear. Make your life&lt;br&gt;
interesting. ;-)&lt;br&gt;
&lt;br&gt;
John</description>
    </item>
    <item>
      <pubDate>Thu, 24 Jul 2008 11:15:09 -0400</pubDate>
      <title>Re: imag and real don't work</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173166#445127</link>
      <author>Bruno Luong</author>
      <description>Rather check real and imag.&lt;br&gt;
&lt;br&gt;
clear real imag % clear variables&lt;br&gt;
which real&lt;br&gt;
which imag&lt;br&gt;
&lt;br&gt;
If it does not return built-in functions then you have a&lt;br&gt;
files that overwrite MATLAB factory functions.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Thu, 24 Jul 2008 12:37:03 -0400</pubDate>
      <title>Re: imag and real don't work</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173166#445150</link>
      <author>Matt Fig</author>
      <description>real = 1:4;&lt;br&gt;
real(3+2*i)&lt;br&gt;
??? Subscript indices must either be real positive integers&lt;br&gt;
or logicals.&lt;br&gt;
&lt;br&gt;
clear real&lt;br&gt;
real(3+2*i)&lt;br&gt;
&lt;br&gt;
ans =&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3</description>
    </item>
  </channel>
</rss>

