MATLAB: How to use InputParser with multiple argument names

inputparser

I would like to use InputParser with multiple possible argument syntax for the same argument. For instance, to have shorter versions, e.g. that I can do:
do_something('factor',2)
and
do_something('f',2)
with the same result. I tried to use InputParser with cell arrays or char arrays but that does not work. Does someone know how to do this?

Best Answer

Set the PartialMatching property of your inputParser instance to true.