view matlab/db/dbtmp.m @ 35:af5fa681278e

Fixed warning.
author samer
date Thu, 06 Feb 2014 14:47:53 +0000
parents 0dd31a8c66bd
children
line wrap: on
line source
function locator=dbtmp(x)
% dbtmp - Save object to matbase under tmp subtree
%
% dbtmp :: A -> action locator(A).

dt=clock;
root=dbroot;
dir='tmp';
if ~exist(fullfile(root,dir),'dir')
	[rc,msg]=mkdir(root,dir);
% if rc==0, error(msg); end
end

fn=uniquefile(dt,root,dir,'m%s');	% make up a filename
save(fullfile(root,[fn '.mat']),'fn','x');
locator=[fn '|x'];