From: <aba...@us...> - 2009-11-19 09:13:06
|
Revision: 6481 http://octave.svn.sourceforge.net/octave/?rev=6481&view=rev Author: abarth93 Date: 2009-11-19 09:12:59 +0000 (Thu, 19 Nov 2009) Log Message: ----------- implements the fillvalue function Modified Paths: -------------- trunk/octave-forge/main/octcdf/INDEX trunk/octave-forge/main/octcdf/PKG_ADD Added Paths: ----------- trunk/octave-forge/main/octcdf/inst/ncfillvalue.m Modified: trunk/octave-forge/main/octcdf/INDEX =================================================================== --- trunk/octave-forge/main/octcdf/INDEX 2009-11-17 14:31:07 UTC (rev 6480) +++ trunk/octave-forge/main/octcdf/INDEX 2009-11-19 09:12:59 UTC (rev 6481) @@ -6,6 +6,7 @@ ncchar ncdouble ncdump + ncfillvalue ncfloat ncint nclong Modified: trunk/octave-forge/main/octcdf/PKG_ADD =================================================================== --- trunk/octave-forge/main/octcdf/PKG_ADD 2009-11-17 14:31:07 UTC (rev 6480) +++ trunk/octave-forge/main/octcdf/PKG_ADD 2009-11-19 09:12:59 UTC (rev 6481) @@ -22,6 +22,7 @@ dispatch('autoscale','ncautoscale','ncvar'); dispatch('autonan','ncautonan','ncvar'); +dispatch('fillvalue','ncfillvalue','ncvar'); dispatch('isrecord','ncisrecord','ncdim'); Added: trunk/octave-forge/main/octcdf/inst/ncfillvalue.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncfillvalue.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/ncfillvalue.m 2009-11-19 09:12:59 UTC (rev 6481) @@ -0,0 +1,40 @@ +## Copyright (C) 2009 Alexander Barth <a....@ul...> +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn {Loadable Function} {@var{fillvalue} = } ncfillvalue(@var{ncvar}) +## @deftypefnx {Loadable Function} ncfillvalue(@var{ncvar},@var{fillvalue}) +## returns or sets the fillvalue of the NetCDF variable ncvar +## +## @seealso{netcdf} + +## Author: Alexander Barth <a....@ul...> + +function varargout = ncfillvalue(varargin); + +varargout = {}; + +if nargin == 1 + ncvar = varargin{1}; + varargout{1} = ncvar.FillValue_; +elseif nargin == 1 + ncvar = varargin{1}; + fv = varargin{2}; + + ncvar.FillValue_ = fv; +else + error('ncfillvalue: wrong number of arguments'); +end + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |