How to find the total number of attributes attached to a variable in Matlab netcdf?
조회 수: 1 (최근 30일)
이전 댓글 표시
I am trying to write a loop (for i=1:m) to find all the attributes attached to each variable, but could not figure out how to find the total number of attributes (the value of 'm' within the loop). Below are all the attribute inquiry functions I find in Matlab:
attname = netcdf.inqAttName(ncid, varid, 0);
[xtype,attlen] = netcdf.inqAtt(ncid, varid, attname);
attid = netcdf.inqAttID(ncid,varid, attname);
It seems that none of the above functions will be able to tell me the number of attributes attached to each variable.
댓글 수: 0
채택된 답변
추가 답변 (1개)
Walter Roberson
2011년 12월 14일
ncinfo against the variable name, and look at the Attributes field of vinfo
참고 항목
카테고리
Help Center 및 File Exchange에서 NetCDF에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!