how to print scripts in PDF on a mac os x?

조회 수: 12 (최근 30일)
Juan
Juan 2011년 4월 6일
The MATAB print command does not allow me to use PDF. How can I print the scripts in PDF in MATLAB?

답변 (4개)

Kaustubha Govind
Kaustubha Govind 2011년 4월 6일
I don't know that this is possible directly from MATLAB, but since MATLAB scripts are basically text files, why not open them up in any other text reader or word processing software and print to PDF?
EDIT:
The PUBLISH command can be used to achieve this. Try:
publish('myfile.m','pdf')
Note that you need to suppress any statement output with a semicolon, if you do not want the output of the statement to be published.

Walter Roberson
Walter Roberson 2011년 4월 6일
Which version are you using? With current versions, you can use print
print -dpdf

Juan
Juan 2011년 4월 6일
Walter thanks but what i want to do is to print the matlab script that contains the code in my mac os x, i am using 2010b

Juan
Juan 2011년 4월 6일
thanks, my t ext editor does not keep the different colors so i was looking for an alternative so i can keep them
  댓글 수: 3
Walter Roberson
Walter Roberson 2011년 4월 6일
When you paste or drag a selection from the Editor to another application, such as Microsoft Word, the pasted text maintains the syntax highlighting colors and font characteristics from the Editor. MATLAB software pastes the selection to the Clipboard in RTF format, which many Microsoft Windows and Macintosh applications support.
Andrew Newell
Andrew Newell 2011년 4월 6일
@Walter, it's a pity you didn't post this as a separate answer. I'd like to vote for it!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by