How To Amend Hints When Writing A Function

3 views (last 30 days)
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

Accepted Answer

Rik
Rik on 20 Oct 2018
Edited: Rik on 20 Oct 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.

More Answers (1)

John hope
John hope on 20 Oct 2018
Thanks

Community Treasure Hunt

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

Start Hunting!