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

33 次查看(过去 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 个评论
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 中查找有关 MATLAB Report Generator 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by