Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Mixed reading of data from a text file

Subject: Mixed reading of data from a text file

From: Mark Gul

Date: 24 Apr, 2013 11:09:10

Message: 1 of 2

Dear Friends

How can i read data from a text file to separate numbers and strings?
for example, abc.txt contains the following information:

1,699,82,831,"A"
123,705,484,840,"long"
537,705,938,840,"breakage"
83,881,460,1024,"what"
516,922,834,1025,"save"
525,1068,746,1208,"life"
161,1096,470,1234,"my"
35,45,921,216,"Tired"
273,261,665,452,"kill"

I need to convert it into a separate txt file with n umbers only without commas.
I tried different way but could not solve it. Anybody can help on this.

Subject: Mixed reading of data from a text file

From: dpb

Date: 24 Apr, 2013 13:05:34

Message: 2 of 2

On 4/24/2013 6:09 AM, Mark Gul wrote:
> Dear Friends
>
> How can i read data from a text file to separate numbers and strings?
> for example, abc.txt contains the following information:
>
> 1,699,82,831,"A"
> 123,705,484,840,"long"
> 537,705,938,840,"breakage"
> 83,881,460,1024,"what"
> 516,922,834,1025,"save"
> 525,1068,746,1208,"life"
> 161,1096,470,1234,"my"
> 35,45,921,216,"Tired"
> 273,261,665,452,"kill"
>
> I need to convert it into a separate txt file with n umbers only without
> commas.
> I tried different way but could not solve it. Anybody can help on this.

doc textscan

Show what you _did_ try...

--

Tags for this Thread

No tags are associated with this thread.

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.

Contact us