view matlab/db/dbsaveas.m @ 14:e1f87438e34c

Work around for lock-up when used by triserver project. By god it's ugly but it seems to work.
author samer
date Thu, 02 Feb 2012 03:01:20 +0000
parents 0dd31a8c66bd
children
line wrap: on
line source
function locator=dbsaveas(fn,x)
% dbsaveas - Save object to MatBase using given name
%
% dbsaveas :: string, A -> action locator(A).
%
% Note: the file must not already exist; an error is raised if it does.

fullfn=fullfile(dbroot,[fn,'.mat']);
if exist(fullfn,'file'), error('dbsaveas:file exists'); end
save(fullfn,'x');
locator=[fn '|x'];