How can I write NaN as missing_values ncwriteatt
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
what is command to write missing_value: 'NaN' as variable attribute,
my command is not right, does anyone know? thanks
ncwriteatt(output_filename,'to','_FillValue','NaN')
Error in ncwriteatt (line 52)
ncObj.writeAttribute(location, attName, attValue);
0 commentaires
Réponses (1)
Walter Roberson
le 6 Fév 2024
You cannot set the _FillValue of a variable after the variable is created.
FillValue — Replacement value for missing values
scalar | "disable"
Replacement value for missing values, specified as a scalar or "disable". The default value is supplied by the netCDF library. To disable replacement values, specify a value of "disable". You cannot disable FillValue when writing string data to files with format netcdf4.
Note
The nccreate function assigns the value of FillValue to the _FillValue attribute of the new netCDF variable varname. You cannot change the value of this attribute after you have created the variable.
This argument is available only for files with format netcdf4 or netcdf4_classic.
0 commentaires
Voir également
Catégories
En savoir plus sur Data Import and Export dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!