samer@0: function locator=dbsaveas(fn,x) samer@0: % dbsaveas - Save object to MatBase using given name samer@0: % samer@0: % dbsaveas :: string, A -> action locator(A). samer@0: % samer@0: % Note: the file must not already exist; an error is raised if it does. samer@0: samer@0: fullfn=fullfile(dbroot,[fn,'.mat']); samer@0: if exist(fullfn,'file'), error('dbsaveas:file exists'); end samer@0: save(fullfn,'x'); samer@0: locator=[fn '|x'];