5.0

5.0 | 1 rating Rate this file 8 Downloads (last 30 days) File Size: 7.13 KB File ID: #17770
image thumbnail

Extract numbers only

by PWANG

 

27 Nov 2007 (Updated 27 Nov 2007)

extract only numbers from text file

| Watch this File

File Information
Description

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.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
readtext

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
29 Nov 2007 Dhiraj Kumar

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

21 Jul 2008 Thierry Dalon

This is just a demo of readtext file FX10946

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
data import PWANG 22 Oct 2008 09:36:56
data export PWANG 22 Oct 2008 09:36:56
xtract PWANG 22 Oct 2008 09:36:56
num PWANG 22 Oct 2008 09:36:56
mining PWANG 22 Oct 2008 09:36:56
data PWANG 22 Oct 2008 09:36:56
number PWANG 22 Oct 2008 09:36:56
data import Jeff 23 Aug 2011 08:30:46

Contact us at files@mathworks.com