10 October 2012 1 8K Report

I recently read some really well written Matlab functions written by others. I don't know what the following lines mean:

ip = inputParser;

ip.Casesensitive = false;

...

ip.addOptional('conDir', [], @ischar);

...

Basically, these are the first lines in that function. I know it means to check the input variable of function. But what exactly the third line means (ip.addOptional('conDir', [], @ischar);)? Why use function handle here?

Similar questions and discussions