MATLAB Answers

I am trying to plot an stl file but it showing error

8 views (last 30 days)
FV = stlread('Part2.stl');
Error using plot
Data must be numeric, datetime, duration or an array convertible to double.
Error in PART1 (line 3)

Answers (2)

Wan Ji
Wan Ji on 19 Aug 2021
Edited: Wan Ji on 19 Aug 2021
Use triplot
FV = stlread('Part2.stl');
  1 Comment
Wan Ji
Wan Ji on 19 Aug 2021
Or you can use patch
patch('vertices', FV.Points, 'faces', FV.ConnectivityList, ...
'facevertexcdata',FV.Points(:,2),'facecolor','interp','facealpha',0.4 );

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!