MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

# 4D plot with contour

Asked by Yasser on 29 Mar 2013

Hello,

I want to plot the following data:

```A: with a size of <7*4>
B: with a size of <7*4>
C: with a size of <7*4>
```

the XY plane should have a 2D contour including the above 3 matrices. then,

```Z: with size of <1*100> will represent the Z-axis
D: with a size of <10*length(Z)> will represent the volumetric data in the volume XYZ
```

Note the number 10 in the D Matrix represents 10 arbitrary points in inside the contour on XY plane

Kind Regards

Yasser

## 1 Comment

Walter Roberson on 29 Mar 2013

For each Z, you have 10 values. Are those 10 values comprised of 5 X-Y pairs? So there is a point at (D(1,K), D(2,K), Z(1)) and another at (D(3,K), D(4,K), Z(1)) and so on ? If so then what size should the point be, what color, or what volume should it occupy?

Or you have a 10-dimensional volume at each Z location?

## Products

No products are associated with this question.

Answer by Sean de Wolski on 29 Mar 2013

It sounds like you want to use a slice() or isosurface()

Personally, I recommend this for making that easier:

http://www.mathworks.com/matlabcentral/fileexchange/764-sliceomatic

Answer by Yasser on 3 Apr 2013

Walter it should be like that:

at each Z axis position i should have 10 points of D

the first group of the 10 points (at Z = 0) should be located inside the contour generated from A, B and C.

Sean your Idea can be nice for me ... i will try it and come back to you

thanks

## 1 Comment

Walter Roberson on 3 Apr 2013

10 points within the given contour is not enough information to determine where those 10 points should be. The three contours either have no overlapping areas (in which case there can be no points at all, not 10), or the three can touch only at a single point (in which case there is exactly 1 point, not 10), or the three can overlap for an area (in which case there is an infinity of points within the area, and 10 scalars is not enough information to tell you which of those infinite points you want.)

Have you considered providing us with a sample plot? Especially one that shows how the 10 "D" values map into the two-dimensional space of the intersection of the three contours?