So in Matlab, if you start to type in a function like find( and then wait after the open parentheses, a small yellow popup will appear showing potential input options, like:
find(X)
find(X,K)
find(X,n,direction)
find(__)
So I'm wondering, is it possible to set up my own function so the same happens? I tried copying the find file in the format, so mine looks like this:
%MY_FUNCTION Description of function
% O = MY_FUNCTION(X) returns the output based on the input X.
%
% O = MY_FUNCTION(X,Y) returns the output based on the input Y.
But after saving it, when I type my_function(, all it shows is my_function(...). Is it just not possible for user functions? Thanks for any input!
It is possible to set up these hints for custom functions, but you can't do it in the function .m file. Instead, you need to put the information in a separate functionSignatures.json file in the same directory as the custom function. You can find the official documentation and file specification here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With