MATLAB Answers

To save the matrix listed as fread as stl file?

3 views (last 30 days)
Jungwu Kim
Jungwu Kim on 16 Dec 2020
Commented: Jungwu Kim on 17 Dec 2020
I changed the stl file of the triangulation to the decimal form through the spread, is there a separate way to change the decimal form back to the stl file?
here my code.
r = fopen('Mesh_04.stl');
A=fread(r);
fclose(r);
whos A
Name Size Bytes Class Attributes
A 137784x1 1102272 double
I want to know how to convert decimal form(A) back to stl file.
And I tried to use the function of the site below, but frankly, I have difficulty setting the variable.
Can you help me if you know?

Accepted Answer

Walter Roberson
Walter Roberson on 16 Dec 2020
fid = fopen('New_Mesh_04.stl', 'w');
fwrite(fid, A, 'uint8');
fclose(fid)
  3 Comments
Jungwu Kim
Jungwu Kim on 17 Dec 2020
thank you! I think I misused your point.

Sign in to comment.

More Answers (0)

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!