changeset 10604:14fa3a9bca76 octave-forge

matlab compat
author abarth93
date Tue, 31 Jul 2012 11:44:13 +0000
parents 85b5e6d9cffe
children 9851caba2bae
files main/octcdf/inst/ncinfo.m
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/main/octcdf/inst/ncinfo.m	Tue Jul 31 11:34:27 2012 +0000
+++ b/main/octcdf/inst/ncinfo.m	Tue Jul 31 11:44:13 2012 +0000
@@ -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();