view matlab/db/dbtmp.m @ 16:f2a0f5eaaaa5

Fixed a compiler warning.
author samer
date Sun, 05 Feb 2012 11:29:55 +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'];