How To Amend Hints When Writing A Function

3 visualizzazioni (ultimi 30 giorni)
John hope
John hope il 20 Ott 2018
Risposto: John hope il 20 Ott 2018
Hi All
In an attempt to learn Matlab I am creating some basic functions.
I have created a function which works but when I call the function, I get hints displayed which is great.
Is there anyway of amending these hints?
Below is an example of a function I wrote to calculate Youngs Modulus, when I call the function I get the hints shown below, but I want to amend the hints so it shows the units?
Any ideas?
Thank you all

Risposta accettata

Rik
Rik il 20 Ott 2018
Modificato: Rik il 20 Ott 2018
It is possible to do a lot if you are using the live editor. Otherwise it is very limited.
Tab-completion tools have been documenten since 2018a, and you can find a bit more help about it here. It is still very limited, but you could try to adapt it for your goals here by including the units in the variable name field.
BTW, the JSON method has reportedly worked since R2016a.

Più risposte (1)

John hope
John hope il 20 Ott 2018
Thanks

Community Treasure Hunt

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

Start Hunting!

Translated by