3d plot from a x y z colum .txt file

1 view (last 30 days)
Hello I´m a mechanichal engineering student and I´m a total beginner in Matlab. I have a .txt file with 3 columns (x,y,z data) taken from Leica and Confocal Uniovi Image software. And i need to import that .txt file and 3d plot it but as said I´m totally noob and dont have any ideo how to start.
Also, I need to import more than one .txt and compare them (to measure the tool wear in a CMC grinding wheel
Any help is welcome.
Thanks

Answers (1)

Cris LaPierre
Cris LaPierre on 27 Oct 2021
Great starting place is MATLAB Onramp. It covers the besics of using MATLAB, including importing data and getting help. It doesn't cover 3D plotting, but you can't do that until you get the data into MATLAB.
Once the data is in MATLAB, consider exploring the interative Create Plot live task. Do you know what type of 3D plot you want to create? You might be interested in scatter3. If you want to creaet a mesh or surface, you likely need to do some reshaping of your data.
  5 Comments
Cris LaPierre
Cris LaPierre on 27 Oct 2021
Ch 9 of MATLAB Onramp covers this, but yes, use hold on and hold off.
You do not need to use subplot unless you have a 2nd graph you want to include in the same figure.
You can specify color as an optional input to scatter3.
Adrián Tomillo Jorge
Adrián Tomillo Jorge on 27 Oct 2021
Thank you very much, I will look at it ;)

Sign in to comment.

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!