nargout_class

版本 1.0.0 (1.4 KB) 作者: Hyeokjin Jho
nargout for methods, and inherited methods
17.0 次下载
更新时间 2018/10/25

查看许可证

nargout doesn't work for methods. Although some workaround was proposed(https://kr.mathworks.com/matlabcentral/answers/96617-how-can-i-use-nargin-nargout-to-determine-the-number-of-input-output-arguments-of-an-object-method), it does not work for inherited methods. This function extends nargout function to methods and inherited methods.

function nargout_class(C,M)

% input
% C : name of the class (char) or Object

% M : name of the method (char) or method handle (function_handle)

% output
% n : number of output argument of method M (double)

引用格式

Hyeokjin Jho (2024). nargout_class (https://www.mathworks.com/matlabcentral/fileexchange/69208-nargout_class), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2018b
与 R2008b 及更高版本兼容
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Handle Classes 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0