grdwrite2
GRDWRITE2(X,Y,Z,'file.grd') will create a grid file containing the data in the matrix Z. X and Y should be either vectors with dimensions that match the size of Z or two-component vectors containing the max and min values for each. The file will be a COARDS-compliant NetCDF file, the standard format for GMT version 4 and later.
Based on the compiled mexfile-based function grdwrite, part of the GMT supplemental packages.
For more information on GMT grid file formats, see:
http://www.soest.hawaii.edu/gmt/gmt/doc/gmt/html/GMT_Docs/node70.html
GMT (Generic Mapping Tools) was developed by Paul Wessel and Walter H. F. Smith (http://gmt.soest.hawaii.edu)
See also GRDREAD2, GRDINFO2
Cite As
Kelsey Jordahl (2024). grdwrite2 (https://www.mathworks.com/matlabcentral/fileexchange/26290-grdwrite2), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Mathematics and Optimization > Mapping Toolbox > Data Import and Export >
- Radar > Mapping Toolbox > Data Import and Export >
- MATLAB > Data Import and Analysis > Data Import and Export > Standard File Formats > NetCDF >
Tags
Acknowledgements
Inspired by: grdread2
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.