MATLAB: Mask the data relating to the contour of the continents mask continents Does anyone have a solution to mask the data relating to the contour of the continents of a netcdf file? Best Answer Perhaps inpolygon will do it? Related SolutionsMATLAB: How to convert NaN values to single -999 value netcdf.putAtt(ncid1,3,'_FillValue', cast(-999, class(pr)) ); MATLAB: How to skip rows when loading data from a netcdf file Take a look at the start, count, and stride inputs that are associated with most netcdf methods, including getVar. For example,mydata = netcdf.getVar(Ncid111, varid, [220 114 1], [1 1 Inf], [1 1 24]);What version of Matlab are you running? If it's relatively recent, you can simplify things by using ncread:mydata = ncread('file.nc', varname, [220 114 1], [1 1 Inf], [1 1 24]); Related QuestionGetting data from netCDF as a listError using netcdf.putVarTime axis in netcdf filesHow to find the total number of attributes attached to a variable in Matlab netcdf
Best Answer