Mercurial > hg > ishara
view general/getparam.m @ 37:beb8a3f4a345
Renamed prefs to options throughout.
author | samer |
---|---|
date | Mon, 28 Jan 2013 10:52:11 +0000 |
parents | 47cb292350f3 |
children |
line wrap: on
line source
function a=getparam(s,field,def) % getparam - get value of named field or default if not present % % getparam :: struct Fields, string~'field name', A~'default value' -> A. % % Typical usage is with structures returned by options. if isfield(s,field), a=s.(field); else a=def; end