samer@0: % dbload - Load value from given matbase locator samer@0: % samer@0: % dbload :: locator(A) -> A. samer@0: samer@0: % SA: 2008-06 - much simplified by using functional form of load samer@0: function x=dbload(loc) samer@0: n=strfind(loc,'|'); samer@0: samer@0: if n>1, samer@0: x=getfield(load(fullfile(dbroot,loc(1:n-1))),loc(n+1:end)); samer@0: else samer@0: error('dbload:badlocator',sprintf('%s is not a valid locator',loc)); samer@0: end