How to surface or mesh plot imported data?
Show older comments
Hi!
I am new to matlab and could not find answer to how to import data organised like a matrix with a space as delimiter. It looks like this
x1 y1 z11
x1 y2 z12
x1 y3 z13 .... (etc)
until the last row
xn y1 zn1
xn y2 zn2
...
xn yn znn
I would like to have the x and y coordinates in the plane and the z coordinates as the height above the plane, either in a surf or a mesh plot, but all tutorials and help articles I find are for excel or use code that throws errors when I try to use them.
All help is appreciated! Thanks! :-)
Accepted Answer
More Answers (1)
KSSV
on 21 Sep 2023
0 votes
Refer this link: https://in.mathworks.com/matlabcentral/answers/412639-creating-surface-plot-from-a-matrix-with-3-columns?s_tid=srchtitle
If you have more doubts..attach your file.
3 Comments
Daniel Bozi
on 21 Sep 2023
Daniel Bozi
on 21 Sep 2023
KSSV
on 21 Sep 2023
Read about @doc:readtable
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!