How to add multiple suggestions to the automatic pop-up help boxes when typing a function?

조회 수: 6 (최근 30일)
I have some functions that can accept variable amounts of inputs and I want to better document them by adding appropriate suggestions to the box that pops up when you begin typing the function name, like this:
find(.png
Most built-in Matlab functions display help boxes like this but when I write a function from scratch, it either displays the inputs I specifically have listed, or it shows (...) if the function accepts "varargin", like so:
plot_Earth_km(.png
Those functions of course already handle the inputs properly, but I want to display the various acceptable ways of calling the function in the displayed suggestions here. Is there a way to customize this feature?
  댓글 수: 4
Adam Danz
Adam Danz 2019년 7월 30일
I know what you're talking about. I've never done this myself but here's a lead.
and
A quicker alternative would be to make useful 'help' notes at the top of your code and cover all of the possible inputs. It looks like you're already doing that.
Nathan
Nathan 2019년 7월 30일
Ah, thank you! Unfortunately I have 2015b, so it looks like that functionality is not supported in my version. Good find though.

댓글을 달려면 로그인하십시오.

답변 (1개)

Renan Thomes
Renan Thomes 2025년 8월 19일
Starting with MATLAB R2018a, you can personalize code suggestions and completions for your functions by following the Customize Code Suggestions and Completions documentation.

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by