<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261270</link>
    <title>MATLAB Central Newsreader - How to plot a graph with discrete points?</title>
    <description>Feed for thread: How to plot a graph with discrete points?</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>Mon, 21 Sep 2009 09:22:01 -0400</pubDate>
      <title>How to plot a graph with discrete points?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261270#681493</link>
      <author>zedong </author>
      <description>I have a problem on plot the graph.&lt;br&gt;
I only have the following data&lt;br&gt;
figgg=[x_i,y_i,z_i].&lt;br&gt;
for example:&lt;br&gt;
x=rand(100,1);&lt;br&gt;
y=rand(100,1);&lt;br&gt;
z=x.^2+y.^2;&lt;br&gt;
figgg=[x,y,z];&lt;br&gt;
you can use this figgg for test.&lt;br&gt;
But as a matter of fact now I only have the  figgg,I don't know how it's computed out. I want to plot a graph to see the 2d function.Thank you very much</description>
    </item>
    <item>
      <pubDate>Mon, 21 Sep 2009 12:06:03 -0400</pubDate>
      <title>Re: How to plot a graph with discrete points?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261270#681520</link>
      <author>Didi Cvet</author>
      <description>&quot;zedong &lt;br&gt;
&quot; &amp;lt;zdongwu@gmail.com&amp;gt; wrote in message &amp;lt;h97gjp$k4m$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I have a problem on plot the graph.&lt;br&gt;
&amp;gt; I only have the following data&lt;br&gt;
&amp;gt; figgg=[x_i,y_i,z_i].&lt;br&gt;
&amp;gt; for example:&lt;br&gt;
&amp;gt; x=rand(100,1);&lt;br&gt;
&amp;gt; y=rand(100,1);&lt;br&gt;
&amp;gt; z=x.^2+y.^2;&lt;br&gt;
&amp;gt; figgg=[x,y,z];&lt;br&gt;
&amp;gt; you can use this figgg for test.&lt;br&gt;
&amp;gt; But as a matter of fact now I only have the  figgg,I don't know how it's computed out. I want to plot a graph to see the 2d function.Thank you very much&lt;br&gt;
&lt;br&gt;
I think that this is 3D function (because you have 3 arguments)&lt;br&gt;
Plot them with &lt;br&gt;
&amp;gt;&amp;gt;plot3(x,y,z)</description>
    </item>
    <item>
      <pubDate>Mon, 21 Sep 2009 14:08:03 -0400</pubDate>
      <title>Re: How to plot a graph with discrete points?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261270#681543</link>
      <author>zedong </author>
      <description>&quot;Didi Cvet&quot; &amp;lt;didi_cvet@yahoo.com&amp;gt; wrote in message &amp;lt;h97q7b$min$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;zedong &lt;br&gt;
&amp;gt; &quot; &amp;lt;zdongwu@gmail.com&amp;gt; wrote in message &amp;lt;h97gjp$k4m$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; I have a problem on plot the graph.&lt;br&gt;
&amp;gt; &amp;gt; I only have the following data&lt;br&gt;
&amp;gt; &amp;gt; figgg=[x_i,y_i,z_i].&lt;br&gt;
&amp;gt; &amp;gt; for example:&lt;br&gt;
&amp;gt; &amp;gt; x=rand(100,1);&lt;br&gt;
&amp;gt; &amp;gt; y=rand(100,1);&lt;br&gt;
&amp;gt; &amp;gt; z=x.^2+y.^2;&lt;br&gt;
&amp;gt; &amp;gt; figgg=[x,y,z];&lt;br&gt;
&amp;gt; &amp;gt; you can use this figgg for test.&lt;br&gt;
&amp;gt; &amp;gt; But as a matter of fact now I only have the  figgg,I don't know how it's computed out. I want to plot a graph to see the 2d function.Thank you very much&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I think that this is 3D function (because you have 3 arguments)&lt;br&gt;
&amp;gt; Plot them with &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt;plot3(x,y,z)&lt;br&gt;
plot3 can only plot point.I want to plot cloudy figure.like the function trisurf.But trisurf need mesh information.I don't have mesh information</description>
    </item>
    <item>
      <pubDate>Tue, 22 Sep 2009 10:24:19 -0400</pubDate>
      <title>Re: How to plot a graph with discrete points?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261270#681792</link>
      <author>Didi Cvet</author>
      <description>&quot;zedong &lt;br&gt;
&quot; &amp;lt;zdongwu@gmail.com&amp;gt; wrote in message &amp;lt;h981c3$9pl$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Didi Cvet&quot; &amp;lt;didi_cvet@yahoo.com&amp;gt; wrote in message &amp;lt;h97q7b$min$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &quot;zedong &lt;br&gt;
&amp;gt; &amp;gt; &quot; &amp;lt;zdongwu@gmail.com&amp;gt; wrote in message &amp;lt;h97gjp$k4m$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I have a problem on plot the graph.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I only have the following data&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; figgg=[x_i,y_i,z_i].&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; for example:&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; x=rand(100,1);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; y=rand(100,1);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; z=x.^2+y.^2;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; figgg=[x,y,z];&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; you can use this figgg for test.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; But as a matter of fact now I only have the  figgg,I don't know how it's computed out. I want to plot a graph to see the 2d function.Thank you very much&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I think that this is 3D function (because you have 3 arguments)&lt;br&gt;
&amp;gt; &amp;gt; Plot them with &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;&amp;gt;plot3(x,y,z)&lt;br&gt;
&amp;gt; plot3 can only plot point.I want to plot cloudy figure.like the function trisurf.But trisurf need mesh information.I don't have mesh information&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
I'm not sure but try this:&lt;br&gt;
&lt;br&gt;
[xx yy]=meshgrid(rand(100,1));&lt;br&gt;
&amp;gt;&amp;gt; zz=xx.^2+yy.^2;&lt;br&gt;
&amp;gt;&amp;gt; surfc(xx,yy,zz)&lt;br&gt;
&amp;gt;&amp;gt; surf(xx,yy,zz)&lt;br&gt;
&amp;gt;&amp;gt; mesh(xx,yy,zz)&lt;br&gt;
one of those plot functions might help you.</description>
    </item>
    <item>
      <pubDate>Tue, 22 Sep 2009 11:07:04 -0400</pubDate>
      <title>Re: How to plot a graph with discrete points?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261270#681797</link>
      <author>zedong </author>
      <description>&quot;Didi Cvet&quot; &amp;lt;didi_cvet@yahoo.com&amp;gt; wrote in message &amp;lt;h9a8kj$ru6$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;zedong &lt;br&gt;
&amp;gt; &quot; &amp;lt;zdongwu@gmail.com&amp;gt; wrote in message &amp;lt;h981c3$9pl$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &quot;Didi Cvet&quot; &amp;lt;didi_cvet@yahoo.com&amp;gt; wrote in message &amp;lt;h97q7b$min$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &quot;zedong &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &quot; &amp;lt;zdongwu@gmail.com&amp;gt; wrote in message &amp;lt;h97gjp$k4m$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; I have a problem on plot the graph.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; I only have the following data&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; figgg=[x_i,y_i,z_i].&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; for example:&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; x=rand(100,1);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; y=rand(100,1);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; z=x.^2+y.^2;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; figgg=[x,y,z];&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; you can use this figgg for test.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; But as a matter of fact now I only have the  figgg,I don't know how it's computed out. I want to plot a graph to see the 2d function.Thank you very much&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I think that this is 3D function (because you have 3 arguments)&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Plot them with &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;&amp;gt;plot3(x,y,z)&lt;br&gt;
&amp;gt; &amp;gt; plot3 can only plot point.I want to plot cloudy figure.like the function trisurf.But trisurf need mesh information.I don't have mesh information&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I'm not sure but try this:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; [xx yy]=meshgrid(rand(100,1));&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; zz=xx.^2+yy.^2;&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; surfc(xx,yy,zz)&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; surf(xx,yy,zz)&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; mesh(xx,yy,zz)&lt;br&gt;
&amp;gt; one of those plot functions might help you.&lt;br&gt;
Yes ,You are right.But I now only have the data  [x_i,y_i,z_i],I don't have the structure.surf need z be a matrix but my z is a vector.Thank you </description>
    </item>
    <item>
      <pubDate>Wed, 23 Sep 2009 09:19:03 -0400</pubDate>
      <title>Re: How to plot a graph with discrete points?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261270#682021</link>
      <author>arich82 </author>
      <description>&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; I only have the following data&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; figgg=[x_i,y_i,z_i].&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; for example:&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; x=rand(100,1);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; y=rand(100,1);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; z=x.^2+y.^2;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; figgg=[x,y,z];&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; you can use this figgg for test.&lt;br&gt;
&lt;br&gt;
&amp;gt; Yes ,You are right.But I now only have the data  [x_i,y_i,z_i],I don't have the structure.surf need z be a matrix but my z is a vector.Thank you &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Is this what you're looking for?&lt;br&gt;
&lt;br&gt;
tri = delaunay(x,y);&lt;br&gt;
h = trisurf(tri, x, y, z);&lt;br&gt;
&lt;br&gt;
See &amp;lt;&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fx_files/5105/1/content/surf_from_scatter.html&quot;&gt;http://www.mathworks.com/matlabcentral/fx_files/5105/1/content/surf_from_scatter.html&lt;/a&gt;&amp;gt;, and maybe &amp;lt;&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/8998&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/8998&lt;/a&gt;&amp;gt;.</description>
    </item>
    <item>
      <pubDate>Tue, 13 Oct 2009 14:36:04 -0400</pubDate>
      <title>Re: How to plot a graph with discrete points?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261270#686700</link>
      <author>zedong </author>
      <description>&quot;arich82 &quot; &amp;lt;|a|r|i|c|8|2|@hotmail.com&amp;gt; wrote in message &amp;lt;h9cp67$t60$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; I only have the following data&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; figgg=[x_i,y_i,z_i].&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; for example:&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; x=rand(100,1);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; y=rand(100,1);&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; z=x.^2+y.^2;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; figgg=[x,y,z];&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; &amp;gt; you can use this figgg for test.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Yes ,You are right.But I now only have the data  [x_i,y_i,z_i],I don't have the structure.surf need z be a matrix but my z is a vector.Thank you &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is this what you're looking for?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; tri = delaunay(x,y);&lt;br&gt;
&amp;gt; h = trisurf(tri, x, y, z);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; See &amp;lt;&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fx_files/5105/1/content/surf_from_scatter.html&quot;&gt;http://www.mathworks.com/matlabcentral/fx_files/5105/1/content/surf_from_scatter.html&lt;/a&gt;&amp;gt;, and maybe &amp;lt;&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/8998&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/8998&lt;/a&gt;&amp;gt;.&lt;br&gt;
&lt;br&gt;
Thank you very much.That must be the best solution.I have never thought about it.Very beautiful</description>
    </item>
  </channel>
</rss>

