0

there is tricky problem I just cant solve with my basic MATLAB skills.

I have a 3D-scatter plot with colour code (that refers to the term property in the caption) that I creted from a four column array (with X,Y,Z and a property column).

With the 3D-scatter I can visualize the spatial property distribution. However, it is rather a qualitative representation (sure the colour code refers to a quantisized colour bar, but with more than 31100 points it is not really an exact reprensation). What I would like to do is finding a good way to quantify the scatter plot and to identify certain zones of interest.

I though about segmenting the 3D-scatter plot coordinate system into smaller cube-like shapes and sum up the property values of the corresponding points inside of these cubes to compare them with each other.

Can you think of a way how to solve this problem? I hope this was understandable.

Best wishes!

Arne
  • 337
  • 1
  • 6
  • 17
  • I think the [interp3](http://de.mathworks.com/help/matlab/ref/interp3.html) might already do what you need. It re-samples scattered 3d-data given as x,y,z,value to a regular grid. If you do not know how this works try starting with interp1, in one dimension or interp2 in two dimensions, which are easier to visualize. – Thomas Dec 08 '14 at 09:53
  • the examples look about right, however, I have issues with the meshgrid input. The X,Y,Z - values of my points have the following properties: min(X) = -156.313; max(X) = 161.3123; min(Y)= -292.0670; max (Y)= -57.5326; min(Z)= -226.1540; max(Z)= 95.5915; what would be a fitting grid? I tried several things but it seems like I don't do it right.. – Arne Dec 08 '14 at 10:25
  • tried something like this: Xq,Yq,Zq] = meshgrid(-155:161,-292:-58,-226:95); >> interp3 Vq = interp3(X,Y,Z,V,Xq,Yq,Zq); but it gives me an error saying "The grid vectors are not strictly monotonic increasing." – Arne Dec 08 '14 at 10:33
  • I've looked into this again and i think the problem is your data needs to be a full regular grid for `interp3`, so maybe `griddatan` is better suited to your needs. Hoewever, re-reading your post, especially if your data is not smooth, segmenting into cubes may be a better idea. So if your data is x,y,z,v - where v holds your property - you can do sth. like `v(x>0.1 & x<0.2 & y>0.1 & y<0.2 & z>0.1 &z<0.2)` to get all v-values inside the cube bounded by 0.1 and 0.2 on all axes. Therein, x>0.1 etc. create a boolean index arrays to index into v. – Thomas Dec 08 '14 at 18:25

0 Answers0