Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

pharsing text in Matlab - textread fget

Status
Not open for further replies.

roztales

Newbie level 2
Joined
Oct 13, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,293
Matlab textread

Hi,

I have a text format that looks like this

string1 | string2| string3
11111| 22| 222| 3|3|3|4|4|4|4|
obs: the values are obviously not real. the thing is that I have numebers and text in the same file

Anyway, I would like to know how to read it through with MATLAB using textread() command. And I also want to throw it in a array. In a cell array or whatever works it out, I have no idea how to do it, can anyone help me??
Thanks
 

chetu

Junior Member level 2
Joined
Aug 1, 2008
Messages
22
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,281
Activity points
1,396
Re: Matlab textread

u need only numbers or both?
i think u can try with "fgetl" function from matlab it will read the entire line .. then u can modify however u want..
 

roztales

Newbie level 2
Joined
Oct 13, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,293
Re: Matlab textread

I need both... text and numbers!!!

Added after 13 minutes:

Is it possible to create an array of strings and numbers???
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top