-
Notifications
You must be signed in to change notification settings - Fork 0
/
hdspreventreg.m
28 lines (24 loc) · 895 Bytes
/
hdspreventreg.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function out = hdspreventreg(setValue)
%HDSPREVENTREG Used by HDS-Toolbox to prevent object registration.
% Copyright (c) 2012, J.B.Wagenaar
% This source file is subject to version 3 of the GPL license,
% that is bundled with this package in the file LICENSE, and is
% available online at http://www.gnu.org/licenses/gpl.txt
%
% This source file can be linked to GPL-incompatible facilities,
% produced or made available by MathWorks, Inc.
persistent value
if nargin > 1
throwAsCaller(MException('HDS:activeHDStree','Incorrect number of arguments.'));
elseif nargin
if islogical(setValue)
value = setValue;
else
throwAsCaller(MException('HDS:activeHDStree','Input argument should be of class BOOLEAN.'));
end
end
if isempty(value)
value = false;
end
out = value;
end