4D interpolation plot with matlab of scattered data
<p>I have a set of data with a value at some x,y,z coordinates. 
However, the coordinates are not evenly spaced. 
I would like to interpolate the data and have a 3D interpolated plot 
where the color is the interpolated value at each x,y,z coordinates (not the value of z). </p>

<p>Also I should mention that my data are confined in space and I only want to interpolate between points that are close. I have multiple sheet-like structures and I do not want interpolation between the sheets. I would therefore need a distance between points criteria I guess.</p>

<p>My problem can be seen with this MATLAB test program</p>

<pre><code>x = rand(100,1)*16 - 8;
y = rand(100,1)*16 - 8;
z = rand(100,1)*16 - 8;
d = rand(100,1)*16 - 8;
</code></pre>

<p>The scatter plot of that works very well</p>

<pre><code>scatter3(x,y,z,5,d);
colormap(jet);
colorbar;
</code></pre>

<p>I would like to have an nice surface with color of that.
Of course the interpolation of the above will be very bad since it is 
random points and color(value) but for my case it has more meaning. </p>

<p>Any ideas on how to accomplish this?</p>

<p><strong>Edit</strong></p>

<p>I shall emphasize the localized nature of my problem (see picture below using scatter3).</p>

<p><a href="https://i.stack.imgur.com/b9mrZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b9mrZ.jpg" alt="Localized interpolation problem."></a></p>

<p>The very interesting solution proposed by Suever using scatteredInterpolant on the same data as the first figure gives me the following picture</p>

<p><a href="https://i.stack.imgur.com/Nw9B0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Nw9B0.jpg" alt="Interpolated picture"></a></p>

<p>Thank you, </p>

<p>Samuel</p>