read_stl_file(name)

File for reading a stl file in MATLAB

You are now following this Submission

Get information in MATLAB about a STL file. Use it as,
[F, V, N] = read_stl_file('myfile.stl');

where F are "faces", V are "vertices" and N are "normals".

The object can be plotted with,

p = patch('Faces', F, 'Vertices', V, 'FaceColor', 'red', 'EdgeColor', 'none');

Cite As

Eugenio (2026). read_stl_file(name) (https://www.mathworks.com/matlabcentral/fileexchange/53736-read_stl_file-name), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired: STL geometry cleanup

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0