Help for live livescripts in Command Window

20 visualizzazioni (ultimi 30 giorni)
Enrique
Enrique il 17 Dic 2022
Risposto: Suvansh Arora il 20 Dic 2022
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.

Risposte (1)

Suvansh Arora
Suvansh Arora il 20 Dic 2022
‘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

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by