Publish main code with clickable links to subroutines
조회 수: 4 (최근 30일)
이전 댓글 표시
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
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.
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!