How can a copy a MATLAB code into word?

I need to make an script of 2 codes into Word but I don't knw how. Could someone help me please?

1 Comment

Hdez - please clarify what you want to do. Do you want to copy (or convert) a MATLAB m-file (that has code) into a Microsoft Word document? Can't you just copy and paste the code?

Sign in to comment.

Answers (2)

Sveinung
Sveinung on 6 Nov 2026 at 13:43
Edited: Sveinung on 6 Nov 2026 at 14:13
If it's a short script, you could copy it directly from the Matlab editor and paste it in a Word-doc by right-clicking and select "Keep Source Formatting". It should keep the format and text color such that it's easier to read than just plain text.

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Tags

Asked:

on 1 Feb 2021

Edited:

on 6 Nov 2026 at 14:13

Community Treasure Hunt

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

Start Hunting!