From: <aba...@us...> - 2012-07-05 13:52:06
|
Revision: 10731 http://octave.svn.sourceforge.net/octave/?rev=10731&view=rev Author: abarth93 Date: 2012-07-05 13:51:57 +0000 (Thu, 05 Jul 2012) Log Message: ----------- Modified Paths: -------------- trunk/octave-forge/extra/ncArray/INDEX trunk/octave-forge/extra/ncArray/inst/@ncArray/coord.m trunk/octave-forge/extra/ncArray/inst/@ncArray/subsasgn.m trunk/octave-forge/extra/ncArray/inst/@ncArray/subsref.m trunk/octave-forge/extra/ncArray/inst/ncCatArray.m Modified: trunk/octave-forge/extra/ncArray/INDEX =================================================================== --- trunk/octave-forge/extra/ncArray/INDEX 2012-07-05 13:39:24 UTC (rev 10730) +++ trunk/octave-forge/extra/ncArray/INDEX 2012-07-05 13:51:57 UTC (rev 10731) @@ -4,5 +4,26 @@ ncCatArray nccoord cached_decompress + @ncArray/coord + @ncArray/ncArray + @ncArray/subsasgn + @ncArray/subsref +ncBaseArray + @BaseArray/BaseArray + @BaseArray/end + @BaseArray/full + @BaseArray/isnumeric + @BaseArray/max + @BaseArray/mean + @BaseArray/min + @BaseArray/moment + @BaseArray/numel + @BaseArray/prod + @BaseArray/reduce + @BaseArray/size + @BaseArray/std + @BaseArray/sum + @BaseArray/sumsq + @BaseArray/var Test script test_ncarray \ No newline at end of file Modified: trunk/octave-forge/extra/ncArray/inst/@ncArray/coord.m =================================================================== --- trunk/octave-forge/extra/ncArray/inst/@ncArray/coord.m 2012-07-05 13:39:24 UTC (rev 10730) +++ trunk/octave-forge/extra/ncArray/inst/@ncArray/coord.m 2012-07-05 13:51:57 UTC (rev 10731) @@ -1,8 +1,10 @@ +% Get coordinate. +% c = coord(A) +% Get a array of structures with the coordinate of ncArray A. + function c = coord(self) c = self.coord; -%'her' - % Copyright (C) 2012 Alexander Barth <bar...@gm...> % % This program is free software; you can redistribute it and/or modify Modified: trunk/octave-forge/extra/ncArray/inst/@ncArray/subsasgn.m =================================================================== --- trunk/octave-forge/extra/ncArray/inst/@ncArray/subsasgn.m 2012-07-05 13:39:24 UTC (rev 10730) +++ trunk/octave-forge/extra/ncArray/inst/@ncArray/subsasgn.m 2012-07-05 13:51:57 UTC (rev 10731) @@ -1,3 +1,8 @@ +% Subscripted assignment. +% subsasgn (A, idx, rhs) +% Perform the subscripted assignment operation according to the subscript specified by idx. +% A slice of the NetCDF variable can be saved by using A(index1,index2,...) = rhs; + function self = subsasgn(self,idx,x) self = subsasgn(self.var,idx,x); Modified: trunk/octave-forge/extra/ncArray/inst/@ncArray/subsref.m =================================================================== --- trunk/octave-forge/extra/ncArray/inst/@ncArray/subsref.m 2012-07-05 13:39:24 UTC (rev 10730) +++ trunk/octave-forge/extra/ncArray/inst/@ncArray/subsref.m 2012-07-05 13:51:57 UTC (rev 10731) @@ -1,3 +1,13 @@ +% Subscripted element selection operation. +% out = subsref (A, idx) +% Perform the subscripted element selection operation according to the subscript specified by idx. +% A slice of the NetCDF variable can be load by using A(index1,index2,...) and attributes +% can be loaded by A.attribute_name or A.('attribute_name') +% If index selection is followed by struct selection 'coord', then the coordinates corresponding to the +% slice are loaded: +% For example, the coordinate of element A(4,3) are: +% [lon,lat] = A(4,3).coord; + function varargout = subsref(self,idx) if strcmp(idx(1).type,'()') Modified: trunk/octave-forge/extra/ncArray/inst/ncCatArray.m =================================================================== --- trunk/octave-forge/extra/ncArray/inst/ncCatArray.m 2012-07-05 13:39:24 UTC (rev 10730) +++ trunk/octave-forge/extra/ncArray/inst/ncCatArray.m 2012-07-05 13:51:57 UTC (rev 10731) @@ -7,7 +7,7 @@ % create a concatenated array from variables (varname) in a list of % netcdf files along dimension dim.Individual elements can be accessed by % subscribs, e.g. C(2,3) and the corrsponding subset of the appropriate file is loaded - +% % This list of netcdf files can be specified as a cell array (filenames), % shell wildcard pattern (e.g. file_*.nc) or a function handle % filenamefun. In this later case, this i-th filename is This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |