From: <aba...@us...> - 2012-07-31 14:33:47
|
Revision: 10793 http://octave.svn.sourceforge.net/octave/?rev=10793&view=rev Author: abarth93 Date: 2012-07-31 14:33:36 +0000 (Tue, 31 Jul 2012) Log Message: ----------- Modified Paths: -------------- trunk/octave-forge/main/octcdf/inst/ncinfo.m trunk/octave-forge/main/octcdf/inst/ncread.m Modified: trunk/octave-forge/main/octcdf/inst/ncinfo.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncinfo.m 2012-07-31 14:32:53 UTC (rev 10792) +++ trunk/octave-forge/main/octcdf/inst/ncinfo.m 2012-07-31 14:33:36 UTC (rev 10793) @@ -41,7 +41,12 @@ tmp.Length = dims{i}(:); % requires octcdf 1.1.6 %tmp.Unlimited = isrecdim(dims{i}); - vinfo.Dimensions = [vinfo.Dimensions; tmp]; + + if isempty(vinfo.Dimensions) + vinfo.Dimensions = [tmp]; + else + vinfo.Dimensions(i) = tmp; + end end @@ -55,7 +60,12 @@ tmp.Name = nm; tmp.Value = na{j}(:); - vinfo.Attributes = [vinfo.Attributes; tmp]; + + if isempty(vinfo.Attributes) + vinfo.Attributes = [tmp]; + else + vinfo.Attributes(j) = tmp; + end end vinfo.FillValue = fillval(nv); Modified: trunk/octave-forge/main/octcdf/inst/ncread.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncread.m 2012-07-31 14:32:53 UTC (rev 10792) +++ trunk/octave-forge/main/octcdf/inst/ncread.m 2012-07-31 14:33:36 UTC (rev 10793) @@ -77,6 +77,11 @@ end x = permute(x,[ndims(x):-1:1]); + +if length(count) < 2 + count(2) = 1; +end + x = reshape(x,count); close(nc) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |