Getting help for a function from another function
Ältere Kommentare anzeigen
Dear all,
suppose I want to get help from a function. I can simply type h=help('myfunction). But then suppose that I have another function, say myfunction2 which is identical to myfunction. As an example myfunction2 could be as follows
function [a,b,c]=myfunction2(varargin)
[a,b,c]=myfunction(varargin{:});
end
It is clear that myfunction and myfunction2 will have the same behavior. The question is, if I want to get help for myfunction2, is it possible to get it from myfunction?
Thanks
Akzeptierte Antwort
Weitere Antworten (2)
the cyclist
am 1 Sep. 2015
1 Stimme
Journeyman solution: Copy & paste the help text from the top of myfunction into top of myfunction2.
2 Kommentare
Patrick Mboma
am 1 Sep. 2015
Cedric
am 1 Sep. 2015
An extended journeyman solution, if there is a large number of wrappers, is to build a tool which updates the help of wrappers automatically based on the help of wrapped functions.
Steven Lord
am 1 Sep. 2015
The lazy solution: make the help text of myfunction2:
myfunction2(...) is the same as myfunction(...) except [describe differences, if any]
The IMAGESC function does this, referring to IMAGE. It also lists IMAGE as a "See also" to encourage users to click on the hyperlink to access the help for IMAGE.
1 Kommentar
Patrick Mboma
am 2 Sep. 2015
Kategorien
Mehr zu Large Files and Big Data finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!