登录论坛

查看完整版本 : MATLAB帮助内容的一种抽象方法


poster
2019-12-10, 16:49
在普通的类方法中,我可以为MATLAB中的“ help”命令提供内容。但是,在编写抽象方法时,帮助功能看不到抽象方法。例如,如果您有一个NeedsHelp类:

classdef NeedsHelp methods (Abstract) INeedHelp(self) % This method is not visible to the help command. end methods function IHaveHelp(self) % This method shows help as expected. end end end 帮助命令的行为如下(R2009b):

>> help NeedsHelp.IHaveHelp This method shows help as expected. >> help NeedsHelp.INeedHelp NeedsHelp.INeedHelp not found. 是否有提供抽象方法文档的解决方案?


回答:
根据Loren在MathWorks上的博客,看来从R2009b开始这是不可能的。看到此评论和她的回复 (http://blogs.mathworks.com/loren/2006/06/07/publishing/#comment-30683) 。



更多&回答... (https://stackoverflow.com/questions/1925222)