Created
November 18, 2011 10:41
-
-
Save morganp/1376126 to your computer and use it in GitHub Desktop.
Matlab better defaults
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Old defaults order dependent | |
function config_old( rx1, rx2 ) | |
if nargin < 2 rx2 = 0; end | |
end | |
%% newer style easy to refactor, no order dependence. | |
function config_new( rx1, rx2 ) | |
if not( exist('rx2') ) rx2 = 0; end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment