How to Make Function Help Stings (not functionSignatures.json)
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
MATLABNuke
il 30 Gen 2024
Commentato: MATLABNuke
il 6 Feb 2024
Hello,
I am wondering if it is possible to achieve function help strings like there are for MATLAB builtins.
For example, in the editor (not the command prompt) if I start typing "pl" then I get a drop down list of autocompletes that list the following
plot 2-D line plot
plot3 3-D point or line plot
place pole placement design
plus add numbers, append stirngs
etc.
My question is, lets say I have myfunc.m. I know how to add some amount of auto-completion with functionSignatures.json. But I don't see in the .json file where I can specify the short descriptions (shown above for MATLAB builtins such "2-D line plot"). Is it possible?
0 Commenti
Risposta accettata
Githin George
il 6 Feb 2024
Hello,
I understand that you are looking for displaying function descriptions during tab auto-completion in MATLAB editor.
The task you want to achieve is possible and can be easily implemented in MATLAB with the “functionSignatures.json” file. You can add the “purpose” field into the JSON schema as shown below.
{
"myFunc": {
"inputs": [
{
"name": "inputArg1",
"kind": "required",
"type":["numeric"],
"purpose": "arg description"
}
],
"purpose": "Function Description"
}
}
The above schema adds auto-complete support for function “myFunc” which takes in a single input. Note that both the argument and function will have descriptions provided in the auto-complete window.
Please refer to the below documentation for more information regarding auto-completion of custom functions.
I hope this helps.
4 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Desktop in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!