<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240510</link>
    <title>MATLAB Central Newsreader - plotting complex numbers</title>
    <description>Feed for thread: plotting complex numbers</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, 05 Dec 2008 15:00:20 -0500</pubDate>
      <title>plotting complex numbers</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240510#615260</link>
      <author>Jason </author>
      <description>Hello,&lt;br&gt;
&lt;br&gt;
I have MATLAB which I have used very successfully for other stuff. I have never used it for complex numbers. A colleague wishes to plot a function - he is having problems with another program and asked me about Matlab ;-)&lt;br&gt;
&lt;br&gt;
The funtion is&lt;br&gt;
&lt;br&gt;
1 + 1/(x(iy-x)) &lt;br&gt;
&lt;br&gt;
for -2 &amp;lt; x &amp;lt; 2&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-2  &amp;lt; y &amp;lt; 2&lt;br&gt;
&lt;br&gt;
I am guessing I need to plot an array of complex numbers or something&lt;br&gt;
&lt;br&gt;
Can some kind soul please tell me how to do this? I would rather not have to do a refresher course on complex numbers ;-)</description>
    </item>
    <item>
      <pubDate>Fri, 05 Dec 2008 16:00:21 -0500</pubDate>
      <title>Re: plotting complex numbers</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240510#615275</link>
      <author>Adam </author>
      <description>&quot;Jason&quot; &amp;lt;j_henderson44@REMOVEhotmail.com&amp;gt; wrote in message &amp;lt;ghbfm4$bfh$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have MATLAB which I have used very successfully for other stuff. I have never used it for complex numbers. A colleague wishes to plot a function - he is having problems with another program and asked me about Matlab ;-)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The funtion is&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 1 + 1/(x(iy-x)) &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; for -2 &amp;lt; x &amp;lt; 2&lt;br&gt;
&amp;gt;     -2  &amp;lt; y &amp;lt; 2&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am guessing I need to plot an array of complex numbers or something&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Can some kind soul please tell me how to do this? I would rather not have to do a refresher course on complex numbers ;-)&lt;br&gt;
&lt;br&gt;
you can just plot imaginary numbers&lt;br&gt;
&lt;br&gt;
x = -2: 0.01: 2;&lt;br&gt;
[X Y] = meshgrid(x);&lt;br&gt;
Z = 1+1./(X .* (1i*Y-X));&lt;br&gt;
&lt;br&gt;
plot(Z, '.-')&lt;br&gt;
&lt;br&gt;
do you want to plot it vs x and y?  In signal processing you would do magnitude and phase plots&lt;br&gt;
mesh(X, Y, log10(abs(Z)))&lt;br&gt;
&lt;br&gt;
mesh(X, Y, unwrap(angle(Z)))&lt;br&gt;
&lt;br&gt;
If this doesn't help you may need to explain more.&lt;br&gt;
~Adam</description>
    </item>
  </channel>
</rss>

