<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Advanced MATLAB: Surface plot of nonuniform data</title>
	<atom:link href="http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/</link>
	<description>Doug Hull is a proud MathWorker who is on a mission to help you with MATLAB.</description>
	<lastBuildDate>Fri, 10 Feb 2012 20:31:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: dhull</title>
		<link>http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2842</link>
		<dc:creator>dhull</dc:creator>
		<pubDate>Tue, 25 Oct 2011 15:33:23 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2842</guid>
		<description>@Thibaud,

How are your results &#039;not good&#039;?

Have you done a surface plot of xlin, ylin, z overlayed over a scatterplot of x1,y1,z1?  Do they seem reasonable?  Is it the interpolation that is bad?

Doug</description>
		<content:encoded><![CDATA[<p>@Thibaud,</p>
<p>How are your results &#8216;not good&#8217;?</p>
<p>Have you done a surface plot of xlin, ylin, z overlayed over a scatterplot of x1,y1,z1?  Do they seem reasonable?  Is it the interpolation that is bad?</p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thibaud</title>
		<link>http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2838</link>
		<dc:creator>Thibaud</dc:creator>
		<pubDate>Thu, 20 Oct 2011 15:42:50 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2838</guid>
		<description>Thanks Doug for your answer.

I spent lot of time to find an other way to do it.
Here is my code :

&lt;pre&gt;
nx = 5000; % Number of x steps
ny = 5000; % Number of y steps
n = 100; % Time step

x1 = Wzx(:,1); % X-coordinate nodes&#039;
y1 = Wzx(:,2); % Y-coordinate nodes&#039;
z1 = Wzx(:,n); % Wzx values a t=n*dt

% X,Y for regular mesh
xlin = linspace(0,8,nx); 
ylin = linspace(0,3.2,nx);

F = TriScatteredInterp(x1,y1,z1); % Interpolant

z = zeros(nx,ny); % Matrix declaration

% Matrix&#039;s filling
for i=1:nx-1 
    for j=1:ny-1
       % For each regular coordinate i,j we evaluate Wzx using the
       % interpolant
        z(i,j)= F(xlin(i),ylin(j)); 
    end
end 

% Compute the contour matrix for isoline 0
C = contourc(z,[0 0]);
&lt;/pre&gt;

What I&#039;m trying to do is to obtain the coordinates (x,y) of the isoline Wzx(x,y) = 0.
Thus, I interpolate my data on a regular mesh in order to use contourc function which enables me to find 0 isoline.

But my results are not good.
Does my code sound sensible ? 

Thank you,
   Thibaud</description>
		<content:encoded><![CDATA[<p>Thanks Doug for your answer.</p>
<p>I spent lot of time to find an other way to do it.<br />
Here is my code :</p>
<pre>
nx = 5000; % Number of x steps
ny = 5000; % Number of y steps
n = 100; % Time step

x1 = Wzx(:,1); % X-coordinate nodes'
y1 = Wzx(:,2); % Y-coordinate nodes'
z1 = Wzx(:,n); % Wzx values a t=n*dt

% X,Y for regular mesh
xlin = linspace(0,8,nx);
ylin = linspace(0,3.2,nx);

F = TriScatteredInterp(x1,y1,z1); % Interpolant

z = zeros(nx,ny); % Matrix declaration

% Matrix's filling
for i=1:nx-1
    for j=1:ny-1
       % For each regular coordinate i,j we evaluate Wzx using the
       % interpolant
        z(i,j)= F(xlin(i),ylin(j));
    end
end 

% Compute the contour matrix for isoline 0
C = contourc(z,[0 0]);
</pre>
<p>What I&#8217;m trying to do is to obtain the coordinates (x,y) of the isoline Wzx(x,y) = 0.<br />
Thus, I interpolate my data on a regular mesh in order to use contourc function which enables me to find 0 isoline.</p>
<p>But my results are not good.<br />
Does my code sound sensible ? </p>
<p>Thank you,<br />
   Thibaud</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dhull</title>
		<link>http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2834</link>
		<dc:creator>dhull</dc:creator>
		<pubDate>Wed, 19 Oct 2011 14:08:09 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2834</guid>
		<description>@Thibaud,

Please post simple code for this.

Doug</description>
		<content:encoded><![CDATA[<p>@Thibaud,</p>
<p>Please post simple code for this.</p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thibaud</title>
		<link>http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2833</link>
		<dc:creator>Thibaud</dc:creator>
		<pubDate>Wed, 19 Oct 2011 13:50:09 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2833</guid>
		<description>Hi Doug,

I have values of a function on a irregular X,Y grid and I would interpolate it in order to find isocurves where the function is equals to 0.
I used your code but I had an error which says that sample data points should be collinear. I don&#039;t know how to handle this problem. 

Do you have an idea ?

Thanks for helping me out.

Regards, 
    Thibaud</description>
		<content:encoded><![CDATA[<p>Hi Doug,</p>
<p>I have values of a function on a irregular X,Y grid and I would interpolate it in order to find isocurves where the function is equals to 0.<br />
I used your code but I had an error which says that sample data points should be collinear. I don&#8217;t know how to handle this problem. </p>
<p>Do you have an idea ?</p>
<p>Thanks for helping me out.</p>
<p>Regards,<br />
    Thibaud</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dhull</title>
		<link>http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2759</link>
		<dc:creator>dhull</dc:creator>
		<pubDate>Tue, 16 Aug 2011 15:19:13 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2759</guid>
		<description>@Brandy,

Try interpn

Doug</description>
		<content:encoded><![CDATA[<p>@Brandy,</p>
<p>Try interpn</p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandy Logan</title>
		<link>http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2752</link>
		<dc:creator>Brandy Logan</dc:creator>
		<pubDate>Mon, 15 Aug 2011 19:40:10 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2752</guid>
		<description>Hi Doug,
I have non-uniform scalar data, X, Y, Z, velocity. I would like to use slice or contourslice to look at planes of data, but I can&#039;t figure out how to get the velocity data into the right format to plot. The error says velocity must be a 3D array

Example Data:
0.0	0	0	13.4
0.5	-1	-1	13.6
0.5	-1	0	13.9
0.5	-1	1	13.8
0.5	0	-1	14.1
0.5	0	0	14.2
0.5	0	1	13.7
0.5	1	-1	13.7
0.5	1	0	14.2
0.5	1	1	14.1
1	-4	-6	24.1
1	-4	-4	21.0
1	-4	-2	17.4
1	-4	0	15.7
1	-4	2	15.4
1	-4	4	17.0
1	-4	6	20.4
1	-2	6	16.1
1	-2	4	13.9
1	-2	2	14.0
1	-2	0	14.3
1	-2	-2	14.7
1	-2	-4	16.6
1	-2	-6	21.1
1	0	-6	20.1
1	0	-4	15.5
1	0	-2	14.6
1	0	0	14.5
1	0	2	14.4
1	0	4	13.8
1	0	6	15.1
1	2	6	17.1
1	2	4	14.6
1	2	2	14.2
1	2	0	14.4
1	2	-2	14.6
1	2	-4	17.1

I can use meshgrid to get a grid for X and Y and griddata to interpolate the Z, but what about velocity?</description>
		<content:encoded><![CDATA[<p>Hi Doug,<br />
I have non-uniform scalar data, X, Y, Z, velocity. I would like to use slice or contourslice to look at planes of data, but I can&#8217;t figure out how to get the velocity data into the right format to plot. The error says velocity must be a 3D array</p>
<p>Example Data:<br />
0.0	0	0	13.4<br />
0.5	-1	-1	13.6<br />
0.5	-1	0	13.9<br />
0.5	-1	1	13.8<br />
0.5	0	-1	14.1<br />
0.5	0	0	14.2<br />
0.5	0	1	13.7<br />
0.5	1	-1	13.7<br />
0.5	1	0	14.2<br />
0.5	1	1	14.1<br />
1	-4	-6	24.1<br />
1	-4	-4	21.0<br />
1	-4	-2	17.4<br />
1	-4	0	15.7<br />
1	-4	2	15.4<br />
1	-4	4	17.0<br />
1	-4	6	20.4<br />
1	-2	6	16.1<br />
1	-2	4	13.9<br />
1	-2	2	14.0<br />
1	-2	0	14.3<br />
1	-2	-2	14.7<br />
1	-2	-4	16.6<br />
1	-2	-6	21.1<br />
1	0	-6	20.1<br />
1	0	-4	15.5<br />
1	0	-2	14.6<br />
1	0	0	14.5<br />
1	0	2	14.4<br />
1	0	4	13.8<br />
1	0	6	15.1<br />
1	2	6	17.1<br />
1	2	4	14.6<br />
1	2	2	14.2<br />
1	2	0	14.4<br />
1	2	-2	14.6<br />
1	2	-4	17.1</p>
<p>I can use meshgrid to get a grid for X and Y and griddata to interpolate the Z, but what about velocity?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dhull</title>
		<link>http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2690</link>
		<dc:creator>dhull</dc:creator>
		<pubDate>Wed, 29 Jun 2011 19:14:38 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2690</guid>
		<description>@Shashikiran

http://blogs.mathworks.com/videos/2008/08/13/matlab-basics-setting-edge-color-for-large-surface-plots/

Try this.

Doug</description>
		<content:encoded><![CDATA[<p>@Shashikiran</p>
<p><a href="http://blogs.mathworks.com/videos/2008/08/13/matlab-basics-setting-edge-color-for-large-surface-plots/" rel="nofollow">http://blogs.mathworks.com/videos/2008/08/13/matlab-basics-setting-edge-color-for-large-surface-plots/</a></p>
<p>Try this.</p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shashikiran</title>
		<link>http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2684</link>
		<dc:creator>Shashikiran</dc:creator>
		<pubDate>Wed, 29 Jun 2011 15:29:02 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-2684</guid>
		<description>Hi,
Here is my problem.
x,y are 2 vectors..say of length 400.
z is a 400x400 matrix generated using x and y vectors....i.e. z(i,j) is calculated based on x(i) and y(j).
now when i plot mesh(x,y,z),the wireframe is too dark....how can i increase the spacing between the wires....without decreasing x and y vector sizes. 
Shashikiran</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Here is my problem.<br />
x,y are 2 vectors..say of length 400.<br />
z is a 400&#215;400 matrix generated using x and y vectors&#8230;.i.e. z(i,j) is calculated based on x(i) and y(j).<br />
now when i plot mesh(x,y,z),the wireframe is too dark&#8230;.how can i increase the spacing between the wires&#8230;.without decreasing x and y vector sizes.<br />
Shashikiran</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dhull</title>
		<link>http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-1816</link>
		<dc:creator>dhull</dc:creator>
		<pubDate>Tue, 02 Feb 2010 17:15:19 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-1816</guid>
		<description>@nitesh,

I do not understand the question.  Please send more details and simple examples via e-mail.

Doug</description>
		<content:encoded><![CDATA[<p>@nitesh,</p>
<p>I do not understand the question.  Please send more details and simple examples via e-mail.</p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nitesh</title>
		<link>http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-1814</link>
		<dc:creator>Nitesh</dc:creator>
		<pubDate>Tue, 02 Feb 2010 16:21:18 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/videos/2007/11/02/advanced-matlab-surface-plot-of-nonuniform-data/#comment-1814</guid>
		<description>Hi Doug,

Thank You very much, PATCH worked for me! It requires the input as I got here. I am getting kind of greedy here, I have same kind of deformation data also for the nodes. Actually, I have mesh data for two meshes, One is fine mesh and one is coarse mesh. The shape is same for both the meshes, the difference is only the number of elements and nodes. I have Deformation data for x,y, and z coordinates for fine mesh. I have to do interpolation and find the deformation data for coarse mesh. Again the problem in using interp1, interp2 and interp3 is the same. The data I have is not in the same format these functions need. Is there any function like PATCH for initerpolation which I can use?

This will help me alot in dealing with this problem.
Thanking You

NItesh</description>
		<content:encoded><![CDATA[<p>Hi Doug,</p>
<p>Thank You very much, PATCH worked for me! It requires the input as I got here. I am getting kind of greedy here, I have same kind of deformation data also for the nodes. Actually, I have mesh data for two meshes, One is fine mesh and one is coarse mesh. The shape is same for both the meshes, the difference is only the number of elements and nodes. I have Deformation data for x,y, and z coordinates for fine mesh. I have to do interpolation and find the deformation data for coarse mesh. Again the problem in using interp1, interp2 and interp3 is the same. The data I have is not in the same format these functions need. Is there any function like PATCH for initerpolation which I can use?</p>
<p>This will help me alot in dealing with this problem.<br />
Thanking You</p>
<p>NItesh</p>
]]></content:encoded>
	</item>
</channel>
</rss>

