I have a .m file with comments in it. When I try to print it, it prints only code, not comments. Are there alternative printing methods from the MATLAB editor?
.m
If you press Cmd P on mac (or Ctrl P on Windows / Linux) from the MATLAB editor, it will neatly print the entire file, including comments.
Here is an example of print output to a file.