Mercurial > hg > plml
annotate matlab/db/dbload.m @ 37:89688ebc447f tip
Deprecating this repository.
author | samer |
---|---|
date | Mon, 05 Jan 2015 17:42:03 +0000 |
parents | 0dd31a8c66bd |
children |
rev | line source |
---|---|
samer@0 | 1 % dbload - Load value from given matbase locator |
samer@0 | 2 % |
samer@0 | 3 % dbload :: locator(A) -> A. |
samer@0 | 4 |
samer@0 | 5 % SA: 2008-06 - much simplified by using functional form of load |
samer@0 | 6 function x=dbload(loc) |
samer@0 | 7 n=strfind(loc,'|'); |
samer@0 | 8 |
samer@0 | 9 if n>1, |
samer@0 | 10 x=getfield(load(fullfile(dbroot,loc(1:n-1))),loc(n+1:end)); |
samer@0 | 11 else |
samer@0 | 12 error('dbload:badlocator',sprintf('%s is not a valid locator',loc)); |
samer@0 | 13 end |