annotate matlab/db/dbtmp.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 locator=dbtmp(x)
|
samer@0
|
2 % dbtmp - Save object to matbase under tmp subtree
|
samer@0
|
3 %
|
samer@0
|
4 % dbtmp :: A -> action locator(A).
|
samer@0
|
5
|
samer@0
|
6 dt=clock;
|
samer@0
|
7 root=dbroot;
|
samer@0
|
8 dir='tmp';
|
samer@0
|
9 if ~exist(fullfile(root,dir),'dir')
|
samer@0
|
10 [rc,msg]=mkdir(root,dir);
|
samer@0
|
11 % if rc==0, error(msg); end
|
samer@0
|
12 end
|
samer@0
|
13
|
samer@0
|
14 fn=uniquefile(dt,root,dir,'m%s'); % make up a filename
|
samer@0
|
15 save(fullfile(root,[fn '.mat']),'fn','x');
|
samer@0
|
16 locator=[fn '|x'];
|
samer@0
|
17
|