Printing live script without code part

조회 수: 44 (최근 30일)
alpedhuez
alpedhuez 2018년 7월 8일
댓글: Daniel Holstein 2019년 9월 25일
Is it possible to print a live script file without code so that readers can get output and graphics (but not code)?

답변 (2개)

Kevin Chng
Kevin Chng 2019년 3월 27일
Untitled.png
In 2019a, it allows you to hide the code before exporting.
  댓글 수: 1
Daniel Holstein
Daniel Holstein 2019년 9월 25일
Is there a way to show some code sections, but not others? I am a professor, and sometimes I want to give a code snippet as an example, and then show (for example) a plot I want students to replicate, but I don't want to give them the answer... Thanks!

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


Yash Trivedi
Yash Trivedi 2018년 7월 9일
Hi,
The ' publish ' method allows the user to generate a view of the MATLAB file in a specified format. You could publish a file in the HTML or PDF format and then print the published file. The method allows the user to specify a 'showCode' option which is set to true by default but can be set to false. If set to false, it won't include the code in the published file.
Refer to the following documentation for the proper syntax - https://www.mathworks.com/help/matlab/ref/publish.html#btbskip-options

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by