上面這種寫法缺點明顯:如果有多個參數有默認值,那么nargin的判斷語句太多了。 那就試試inputParser。比如:. function [result]=some_fun(varargin) ...
確定! 回上一頁