You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
ASCII2XYZ reads in a raster text file in ARC ASCII format and converts values to a m x 3 matrix of x, y, a z values.
This code is mostly vectorized and performs well with reasonably large files (see example below).
%read in a 25 MB file
a=dir('foo.txt')
a =
name: 'foo.txt'
date: '17-Oct-2008 08:53:34'
bytes: 25437683
isdir: 0
datenum: 7.3370e+005
tic
xyz=ascii2xyz('foo.txt');
toc
Elapsed time is 8.110956 seconds.
Cite As
Andrew Stevens (2026). ascii2xyz (https://www.mathworks.com/matlabcentral/fileexchange/21785-ascii2xyz), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired by: Raster to XYZ
General Information
- Version 1.1.0.0 (2.63 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
