How can delete a variable within a netcdf file
显示 更早的评论
hello all, I have a problem, I need to delete a variable from a file with *. nc ... I've only found a command to delete file attributes within ... but the entire variable, not ... To delete an attribute is used netcdf.delAtt .... if someone could help me?
thank you very much Monica
采纳的回答
更多回答(2 个)
Ashish Uthama
2013-10-30
0 个投票
"Attributes are more dynamic than variables or dimensions; they can be deleted and have their type, length, and values changed after they are created, whereas the netCDF interface provides no way to delete a variable or to change its type or shape." - http://www.unidata.ucar.edu/software/netcdf/docs/netcdf.html
The only way would be to copy over everything, but the variable you want to delete, to a new file.
类别
在 帮助中心 和 File Exchange 中查找有关 NetCDF 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!