From: <aba...@us...> - 2012-07-31 11:44:19
|
Revision: 10790 http://octave.svn.sourceforge.net/octave/?rev=10790&view=rev Author: abarth93 Date: 2012-07-31 11:44:13 +0000 (Tue, 31 Jul 2012) Log Message: ----------- matlab compat Modified Paths: -------------- trunk/octave-forge/main/octcdf/inst/ncinfo.m Modified: trunk/octave-forge/main/octcdf/inst/ncinfo.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncinfo.m 2012-07-31 11:34:27 UTC (rev 10789) +++ trunk/octave-forge/main/octcdf/inst/ncinfo.m 2012-07-31 11:44:13 UTC (rev 10790) @@ -5,6 +5,7 @@ % return information about complete NetCDF file (filename) or about % the specific variable varname. +% function info = ncinfo(filename,varname) nc = netcdf(filename,'r'); @@ -35,13 +36,17 @@ dims = fliplr(dim(nv)); for i=1:length(dims) - vinfo.Dimensions{i} = name(dims{i}); + tmp = struct(); + tmp.Name = name(dims{i}); + tmp.Length = dims{i}(:); + tmp.Unlimited = isrecord(dims{i}); + vinfo.Dimensions(i) = tmp; end na = att(nv); -%vinfo.Attributes = []; +vinfo.Attributes = []; for j=1:length(na) tmp = struct(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |