Plotting z values associated with xy coordinate for 3d plot
Mostra commenti meno recenti
I am trying to plot a 3d plot for a magnetic data set. Each z value is associated with an x,y coordinate.
For example there may be some point 1,2 with a value of 67. This in turn would plot on the xy plane at 1,2, but would have point at 67.
I want to do this for a major data set with lots of points so I cannot post my code.
Here is what I did:
I imported the data from an excel spread sheet. I set the x coordinates as x = [...], y = [...], and z = [...]. Each vector is the same dimension.
Then i did:
figure;
axis([xmin xmax ymin ymax zmin zmax]);
meshc(X,Y,Z);
5 Commenti
Walter Roberson
il 21 Feb 2013
How does the result you get differ from the result you want?
Colton
il 21 Feb 2013
Modificato: Walter Roberson
il 17 Mar 2013
Colton
il 21 Feb 2013
Colton
il 21 Feb 2013
Wouter
il 17 Mar 2013
Hi Colton,
A simple solution might be using the plot3 function. You can use griddata to create a surface through your data points. See the help file for griddata.
Risposte (1)
Omid Adljuy
il 5 Apr 2013
0 voti
If you want to plot a 3D surface using your dataset, then the patch command shall help you. However, the patch command requires an additional Faces matrix. Faces matrix defines the points that must be connected to each other to form the triangles of the mesh of the 3D structure.
Categorie
Scopri di più su Surface and Mesh Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!