view matlab/db/dbtmp.m @ 24:27c10ed38592

Added padd.m to remove external dependencies; Matlab output lines now prefixed with '| '
author samer
date Wed, 22 Feb 2012 21:17:52 +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'];