annotate matlab/db/dbsaveas.m @ 6:d3b9cbaee77b
Added Makefile to install Matlab components.
author |
samer |
date |
Thu, 19 Jan 2012 14:28:39 +0000 |
parents |
0dd31a8c66bd |
children |
|
rev |
line source |
samer@0
|
1 function locator=dbsaveas(fn,x)
|
samer@0
|
2 % dbsaveas - Save object to MatBase using given name
|
samer@0
|
3 %
|
samer@0
|
4 % dbsaveas :: string, A -> action locator(A).
|
samer@0
|
5 %
|
samer@0
|
6 % Note: the file must not already exist; an error is raised if it does.
|
samer@0
|
7
|
samer@0
|
8 fullfn=fullfile(dbroot,[fn,'.mat']);
|
samer@0
|
9 if exist(fullfn,'file'), error('dbsaveas:file exists'); end
|
samer@0
|
10 save(fullfn,'x');
|
samer@0
|
11 locator=[fn '|x'];
|