Can someone tell me how to include line numbers when publishing m-file to doc?

조회 수: 10 (최근 30일)
Hi I try to publish my m-code to a doc file. I would like to include line number in the doc file. Can someone tell me how to do it? Many thanks. Chen

채택된 답변

Matt J
Matt J 2013년 1월 24일
편집: Matt J 2013년 1월 24일
One way is to do
>>dbtype yourFile.m
and copy/paste the results to your .doc file.
  댓글 수: 2
Matt J
Matt J 2013년 1월 24일
Or, copy and paste the dbtype output to another .m file and publish that.
Chen
Chen 2013년 1월 24일
Thanks Matt Although dbtype can help, it is not what I am looking for. I did try copy the dbtype output to a new m.file to be published. It does not work, since each line does not meet m-file format.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by