What do the words ParseInput and Varagin mean ?

11 ビュー (過去 30 日間)
Emmanuel
Emmanuel 2014 年 9 月 26 日
回答済み: Adam 2014 年 9 月 26 日
What does parse input and varagin mean in matlab?

回答 (2 件)

Adam
Adam 2014 年 9 月 26 日
doc InputParser
may also be of use depending what context you heard of parse input. I have never used InputParser myself though I've always wanted to try it. I hate functions that take varargin as their arguments so I don't write them so have never really needed InputParser. validateattributes always does the job for me with named function arguments.
Anyway, InputParser allows you to state what is expected in the rather unhelpfully named varargin array.

Guillaume
Guillaume 2014 年 9 月 26 日
varagin, nothing. varargin (with an r) means any number of arguments. See
doc varargin
parseinput is not a standard function of matlab but in used in plenty of mathworks function to validate and parse the inputs, as the name indicates. It is always a private function of the file where it's used, so you can't call it yourself anyway.

カテゴリ

Help Center および File ExchangeArgument Definitions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by