1

I know that this question was already dscussed here, especially in this thread: How to deal with name/value pairs of function arguments in MATLAB

But since all of the threads I found are quite old (araound 2010) and I shouldn't ask questions as "answers": Is there a straight forward way in Matlab 2014b to handle this?

And yes, I know that there a quite a lot of home-brewed workarounds, but I'd like to avoid them.

Thanks!

Community
  • 1
  • 1
user3296542
  • 15
  • 1
  • 9
  • No, I don't believe there is, unfortunately. Your best option is still a home-brew solution, or something like `inputparser`. You could also look into the `inputname` function, but I can see many problems with an approach like that. – MrAzzaman Sep 23 '14 at 07:10
  • Thanks for the answer! Yes, 'inputname' seems to be troublesome since I have no control over the variablenames with witch the function is called. – user3296542 Sep 23 '14 at 07:42
  • Since ages I am using [process_options.m](https://www.google.com/search?q=%22process_options%22+filetype%3Am). It is stable, easy to use and has been included in various matlab frameworks. Don't know anything about performance though -- might be that there are faster implementations. Feature I like most with process_options is the "unused_args" return value, that can be used to split input args in groups of args for, e.g., subprocesses. – georg Sep 23 '14 at 08:07

0 Answers0