]> Creatis software - CreaPhase.git/blob - octave_packages/dataframe-0.9.1/@dataframe/isscalar.m
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / dataframe-0.9.1 / @dataframe / isscalar.m
1 function resu = isscalar(df)
2   %# function resu = isscalar(df)
3   %# returns true if the dataframe can be converted to a vector
4
5   %% Copyright (C) 2009-2012 Pascal Dupuis <Pascal.Dupuis@uclouvain.be>
6   %%
7   %% This file is part of Octave.
8   %%
9   %% Octave is free software; you can redistribute it and/or
10   %% modify it under the terms of the GNU General Public
11   %% License as published by the Free Software Foundation;
12   %% either version 2, or (at your option) any later version.
13   %%
14   %% Octave is distributed in the hope that it will be useful,
15   %% but WITHOUT ANY WARRANTY; without even the implied
16   %% warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
17   %% PURPOSE.  See the GNU General Public License for more
18   %% details.
19   %%
20   %% You should have received a copy of the GNU General Public
21   %% License along with Octave; see the file COPYING.  If not,
22   %% write to the Free Software Foundation, 51 Franklin Street -
23   %% Fifth Floor, Boston, MA 02110-1301, USA.
24
25   %#
26   %# $Id: isscalar.m 9585 2012-02-05 15:32:46Z cdemills $
27   %#
28
29   resu = ismatrix(df) & (length(find(df._cnt > 1)) < 1);  
30
31 endfunction