How to meshgrid set of points in 3d

Hello there, how would wou grid 8 points?
p1 = [3 1 1]
p2 = [3 -1 1]
p3 = [3 -1 -1]
p4 = [3 1 -1]
q1 = [2 2 2]
q2 = [2 -2 2]
q3 = [2 -2 -2]
q4 = [2 2 -2]
Those points are not the ones I am using, but just an example.
The points I am trying to grid are over a spheric surface, would it work?

6 Comments

What would the result look like? And did you store the data in numbered variables or in an array?
The result should look like amesh that unites those points, they are stored in the programm just like showed in the question.
So you want to create a wire frame plot? and these values are coordinates?
Exactly.
What about plot3?
Will it connect the dots?

Sign in to comment.

 Accepted Answer

Javier
Javier on 28 Aug 2020
I think I just solved it, I first saved the dots in a matrix and then separated it in three vectors, for x y and z. And then I used trimesh, instead of meshgrid.
I will leave the question open in case anyone else has a diferent answer.
Thank you so much.

More Answers (0)

Products

Release

R2020a

Asked:

on 28 Aug 2020

Answered:

on 28 Aug 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!