Possible Duplicate:
Default Arguments in Matlab
How to deal with name/value pairs of function arguments in MATLAB
What if you need to create a function with tones of optional parameters. Is there a way to call that functions later on naming passed arguments for readability:
foo(123, and=456)
The comparable way of doing this in Matlab is to have name/value pairs:
foo(123,'and',456,'something',[1 2 3])
See the answers to this question on how to deal with them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With