Thread Subject: text scan

Subject: text scan

From: justabovemaine maine

Date: 9 May, 2009 15:35:02

Message: 1 of 2

Hello, I have a single column, comma-delimited text file with about 8000 entries such as '800G', '800', '720', '720G' etc. What is the best way to (1) load this csv file into matlab and (2) in a loop, identify all entries with the number, say, '800' (ignoring the trailing letter in some cases)? thanks so much in advance for your help!

- justabovemaine

Subject: text scan

From: John

Date: 13 May, 2009 16:27:02

Message: 2 of 2

[data] = textread('yourfile.csv','%s'); %data will be a cell array of string
data_clean = regexprep(d,'[a-zA-Z]',''); %replaces any alphabetic character with empty string.




"justabovemaine maine" <justabovemaine@gmail.com> wrote in message <gu47r6$s1o$1@fred.mathworks.com>...
> Hello, I have a single column, comma-delimited text file with about 8000 entries such as '800G', '800', '720', '720G' etc. What is the best way to (1) load this csv file into matlab and (2) in a loop, identify all entries with the number, say, '800' (ignoring the trailing letter in some cases)? thanks so much in advance for your help!
>
> - justabovemaine

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
textscan Sprinceana 10 Sep, 2009 10:21:17
rssFeed for this Thread

Contact us at files@mathworks.com