Is there a way to programmatically display documentation pages for the methods of the Simulink.SimulationInput class rather than the page for class?

조회 수: 4 (최근 30일)
This is a niche issue I ran into, but I set up a hyperlink in a Live Script to run...
matlab: doc setPostSimFcn
... to try to link other users to the documentation for the method, setPostSimFcn, of the Simulink.SimulationInput class since there are strict rules for using this method. When the user clicks on this hyperlink, they are directed to the Help Browser equivalent of this online Documentation page (the page about the class to which the method belongs) rather than this page (the page about the method). I could always set the hyperlink to open the online Documentation page in a web browser, but I like to keep documentation in the Help Browser. Is there another way to call the doc function to link to the method page rather than the class page?
  댓글 수: 4
Zachary
Zachary 2020년 6월 1일
@Fangjun Jiang, I think I know why it's not replicable. This seems to only happen if I have previously programmatically opened the Simulink.SimulationInput class page in the Help Browser. Try the following...
  1. Open a new instance of MATLAB r2019b
  2. From the Command Window, run >> doc setPostSimFcn . The correct page will open.
  3. From the Command Window, run >> doc Simulink.SimulationInput . The class's page will open.
  4. From the Help Browser, close the Simulink.SimulationInput page.
  5. From the Command Window, rerun >> doc setPostSimFcn . The incorrect page (the class's page) will open.
I couldn't figure out any way to reverse this other than opening a new instance of MATLAB.
Fangjun Jiang
Fangjun Jiang 2020년 6월 1일
Indeed! You can report to Mathworks tech support to see if it's a bug. I have one workaround.

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

채택된 답변

Fangjun Jiang
Fangjun Jiang 2020년 6월 1일
편집: Fangjun Jiang 2020년 6월 1일
Use web() instead of doc()
web(fullfile(docroot, 'simulink/slref/setpostsimfcn.html'))
web(fullfile(docroot, 'simulink/slref/simulink.simulationinput-class.html'))
You can use doc() to bring up the page and then right click, "Get Page Address".
In Live Editor, still use "matlab: web()"

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Help and Support에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by