![]() |
EPR Imaging Toolbox collection user manual |
safeget Get a field of a structure Syntax: res = safeget(structure, fld, default) Description: Returns a field of a structure or default value if this field is absent. Example: a = struct('f1', 45, 'f2', 'Hello!'); res1 = safeget(a, 'f1', 44) res2 = safeget(a, 'f2', '???????????????') res3 = safeget(a, 'f3', '?') res4 = safeget(a, 'f1', [1,2,3,4,5]) Legend: EPR-IT functions; MATLAB functions; comments. |