File Exchange

image thumbnail

Extract numbers only

version (7.13 KB) by p WANG
extract only numbers from text file

1 Download

Updated 19 May 2016

View License

This is inspired by Peder's READTEXT
and use it to extract numbers only and output an array of only numerical value. The input file can be any numbers mixed with text, symbols,
as long as the numbers are separated from letters at least by a space.
For example, it won't work on 123abc, because computer does not know it should be 1,23 or 12,3, so it will work on 123 abc or 123,abc to extract
a numerical value 123. This is useful for machine generated file often contains some commented text along with values.

Comments and Ratings (2)

Thierry Dalon

This is just a demo of readtext file FX10946

Dhiraj Kumar

Thanks a lot! it worked this time.......


compliant with new license

MATLAB Release Compatibility
Created with R2006b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: readtext