Mercurial > hg > plml
annotate matlab/db/dbdrop.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 function dbdrop(loc) |
samer@0 | 2 % dbdrop - delete matfile at given locator from matbase |
samer@0 | 3 % |
samer@0 | 4 % dbdrop :: locator(A) -> action unit. |
samer@0 | 5 % |
samer@0 | 6 % The files containing the specified locators are deleted from |
samer@0 | 7 % the file system. If the file pointed to by the locator does |
samer@0 | 8 % not exist, a warning is given but the function completes. |
samer@0 | 9 |
samer@0 | 10 % SA 2008-06 - No longer maps over multiple arguments. |
samer@0 | 11 |
samer@0 | 12 n=strfind(loc,'|'); |
samer@0 | 13 if n>1, matname=loc(1:n-1); else matname=loc; end |
samer@0 | 14 fn=fullfile(dbroot,[matname '.mat']); |
samer@0 | 15 |
samer@0 | 16 if exist(fn,'file') |
samer@0 | 17 fprintf('*** DELETING FILE: %s\n', fn); |
samer@0 | 18 delete(fn); |
samer@0 | 19 else |
samer@0 | 20 fprintf('*** Warning: %s does not exist\n', fn); |
samer@0 | 21 end |
samer@0 | 22 |