1 function DIM=flag_implicit_samplerate(i)
2 % The use of FLAG_IMPLICIT_SAMPLERATE is in experimental state.
3 % FLAG_IMPLICIT_SAMPLERATE might even become obsolete.
6 % FLAG_IMPLICIT_SAMPLERATE sets and gets default mode for handling NaNs
7 % The default DIM argument is stored in the global variable FLAG_implicit_samplerate
8 % The idea is that the DIM-argument is not necessary. This might enable
11 % flag_implicit_samplerate(0)
12 % calculation along first non-singleton dimension
13 % flag_implicit_samplerate(1)
14 % calculation along columns
15 % flag_implicit_samplerate(2)
16 % calculation along rows
18 % DIM = flag_implicit_samplerate()
21 % flag_implicit_samplerate(DIM)
24 % DIM = flag_implicit_samplerate(DIM)
28 % - compatible to Matlab and Octave
32 % $Id: flag_implicit_samplerate.m 5090 2008-06-05 08:12:04Z schloegl $
33 % Copyright (C) 2000-2002,2008 by Alois Schloegl <a.schloegl@ieee.org>
35 % This program is free software: you can redistribute it and/or modify
36 % it under the terms of the GNU General Public License as published by
37 % the Free Software Foundation, either version 3 of the License, or
38 % (at your option) any later version.
40 % This program is distributed in the hope that it will be useful,
41 % but WITHOUT ANY WARRANTY; without even the implied warranty of
42 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 % GNU General Public License for more details.
45 % You should have received a copy of the GNU General Public License
46 % along with this program. If not, see <http://www.gnu.org/licenses/>.
48 global FLAG_implicit_samplerate;
50 %%% check whether FLAG was already defined
51 if exist('FLAG_implicit_samplerate')~=1,
52 FLAG_implicit_samplerate = 1;
54 if isempty(FLAG_implicit_samplerate),
55 FLAG_implicit_samplerate = 1;
59 fprintf(2,'Warning: FLAG_IMPLICIT_SAMPLERATE is in an experimental state\n');
60 fprintf(2,'It might become obsolete.\n');
61 FLAG_implicit_samplerate = i;
64 DIM = FLAG_implicit_samplerate;