View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Function for importing and plotting STL files in MATLAB

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

5.0 | 1 rating Rate this file 57 Downloads (last 30 days) File Size: 1.54 KB File ID: #41910 Version: 1.0

Function for importing and plotting STL files in MATLAB



This file will import and plot ASCII STL file in MATLAB.

| Watch this File

File Information

The file may not be time and space efficient but i think its well documented and can be easily understood by beginners.To avoid complexity file does not consider normal vectors.

Required Products MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
13 Jun 2016 Ron Perrone

Unfortunately this function didn't work for me. Wouldn't read the file.

Error in readSTL (line 4)

Open to suggestions?

Comment only
17 Aug 2013 Eric Ludlam

Eric Ludlam (view profile)

I like this simple reader which worked great for output from openSCAD.

I used this code snippet to convert the coordinate return value into something I could drop right onto a patch object:

verts = reshape(coordinates,3,[])';
tri = reshape(1:size(verts,1),3,[])';

Contact us