You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mikhail Panko edited this page Aug 29, 2013
·
3 revisions
Don’t use any numbers in code directly; turn them into parameters and define in the beginning of a script
In functions requiring many parameter inputs (or where you expect the number of such inputs to grow in the future) opt to pass them as one structure instead of a list of individual parameters. This will make the code more readable and reduce the necessity for refactoring in the future
Put all parameters which might be used by more than one function into one separate project parameter structure and pass it along to functions; initialize this project parameter structure in a separate function, e.g. setParams()
An example of a project parameter structure in MATLAB: