Help for live livescripts in Command Window

조회 수: 9 (최근 30일)
Enrique 2022년 12월 17일
답변: Suvansh Arora 2022년 12월 20일
I am transforming some of the scripts I use (*.m) to matlab livescript (*.mlx) and I would like to use the help command function to display some information regarding the livescripts contained on a path. Is it possible to do this with livescripts or this feature has not been implemented yet ?
On the mathworks help center the following information is provided. (Help for functions in Command Window)
If name specifies the name or partial path of a folder:
  • If the folder contains a nonempty Contents.m file, the help function displays the file. Contents.m contains a list of MATLAB program files in the folder and their descriptions.
  • If the folder contains an empty Contents.m file, the help function displays name is a folder.
  • If the folder does not contain a Contents.m file, the help function lists the first line of help text for each program file in the folder.
  • If name is the name of both a folder and another item on the MATLAB search path (such as a method, class, toolbox, or variable), the help function displays the associated text for the item on the search path and a link to display the help text for the folder.

답변 (1개)

Suvansh Arora
Suvansh Arora 2022년 12월 20일
‘LiveScript’ in MATLAB is not designed to display content or help messages on the command window. Even though if you are looking for a workaround, follow the procedure mentioned below:
  1. Export the ‘LiveScripts’ to ‘.m’ scripts in the same directory structure using ‘export’, follow the documentation mentioned below for reference:Convert live script or function to standard format - MATLAB export
  2. Now for every ‘Livescript’ you may choose to display help messages.
Related MATLAB answers article:
  1. Programmatically run and export live script:Programmatically run and export live script - MATLAB Answers - MATLAB Central
  2. How to display text in command window using MATLAB ‘LiveScript’:how do i display text in command window matlab LiveScript? - MATLAB Answers - MATLAB Central


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




Community Treasure Hunt

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

Start Hunting!

Translated by