Hi Manikatam,
Yes, it can be achieved this by first obtaining the 3D coordinates of the points using Multidimensional Scaling (MDS) via mdscale, and then applying a transformation to align the points according to your specified conditions. Here's a step-by-step approach:
1.Obtain Initial Coordinates: Use mdscale to get the initial 3D coordinates of the 20 points from your distance matrix D.
2. Define New Axes: You want to redefine the coordinate system such that:
- Point 1 is at the origin.
- Point 3 lies on the X-axis.
- Point 5 lies on the XY-plane.
- Point 20 defines the Z direction (but since you want a 3D representation, this point will help define the transformation rather than lying strictly on the Z-axis with no X or Y components in the new system).
3. Apply Transformation: To achieve this, you'll need to:
- Translate all points so that Point 1 is at the origin.
- Rotate the points so that Point 3 lies on the X-axis.
- Rotate again so that Point 5 lies on the XY-plane.
- Ensure Point 20 provides orientation for the Z direction through these transformations.
Hope this helps.