Publish main code with clickable links to subroutines

5 ビュー (過去 30 日間)
Eugene
Eugene 2011 年 2 月 8 日
回答済み: Rolfe Dlugy-Hegwer 2013 年 12 月 18 日
Hello,
I have a question regarding publishing a Matlab code (which I have never done before), to a html file (and I have no experience with html either).
I have a rather long code, with over 50 related subroutines, not including those built in Matlab subroutines. When I run the profiler the subroutines appear in whatever code I run as (what I believe are) hyperlinks, clicking on these allows me to step into such a subroutine within the profile output. Is it possible to create something similar using the publish function? So the user can peruse through the main code and step into any subroutines as they appear?
So far if I publish the commented main program to a html document (with the code visible) none of the subroutines appear, though I am unclear if any options I can choose from will automatically create the output that I want. Will I have to publish every individual subroutine program to a html file, place them all in one folder, and then create a hyperlink to each subroutine individually where they are called by other subroutines? I presume this would be a static hyperlink as all html files will be in the same folder? Will these hyperlinks have to appear in comment sections, or can I have them within the 'displayed code' of the published document?
I do not want to run the code while publishing as there are too many options throughout and it's not possible to cycle through everything in one run.
Apologies for the basic level of these queries, but I have no experience with either of these features.
Thanks
  2 件のコメント
Daniel Armyr
Daniel Armyr 2012 年 2 月 22 日
This is a valid question.
I think publishing code is not excactly what you are looking for. Publishing is for getting a clean and to-the-point report showing one single run including the results.
What you seem to want is to publish the documentation, much like what javadoc or Doxygen do. If you go to the Current Folder browser, click the cog wheel and select Reports->Help Report, or one of the other reports, that might give you something closer to what you want.
Muthu Annamalai
Muthu Annamalai 2013 年 6 月 26 日
@Daniel nice suggestion

サインインしてコメントする。

回答 (1 件)

Rolfe Dlugy-Hegwer
Rolfe Dlugy-Hegwer 2013 年 12 月 18 日

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by