Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bahanonu committed May 11, 2020
1 parent da60659 commit 621e65e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Please see my 2014 write-up __[dealing with variable options (varargin) in matlab](https://bahanonu.com/getOptions)__ ([https://bahanonu.com/getOptions](https://bahanonu.com/getOptions)) for details and reasons behind implementing and using this function. Installation and usage instructions below.

[![View getOptions on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/75464-getoptions)
Also find function on MATLAB File Exchange: [![View getOptions on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/75464-getoptions).

Contact: __Biafra Ahanonu, PhD (bahanonu [at] alum [dot] mit [dot] edu)__.

Expand All @@ -20,7 +20,7 @@ Test by running `unitTestGetOptions` unit test. Will print out the modified stru
## Instructions on use
There are two ways to have parent functions pass Name-Value pairs to child functions that `getOptions` will parse to update default options in child function.

__Note_ that `getOptions` has a `recursiveStructs` optional Name-Value input argument itself that if enabled (the default), causes `getOptions` to crawl through any options that are structures and replace only fieldnames that are present in the options passed by the parent function. If this is disabled, `getOptions` will replace any options that are structures with the entire structure input by the user regardless of whether the default options had a specific structure.
__Note__ that `getOptions` has a `recursiveStructs` optional Name-Value input argument itself that if enabled (the default), causes `getOptions` to crawl through any options that are structures and replace only fieldnames that are present in the options passed by the parent function. If this is disabled, `getOptions` will replace any options that are structures with the entire structure input by the user regardless of whether the default options had a specific structure.

### Method #1
Use the `'options', options` [Name-Value](https://www.mathworks.com/help/matlab/ref/varargin.html) pair to input an `options` structure that will overwrite default options in a function.
Expand Down

0 comments on commit 621e65e

Please sign in to comment.