Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

read list of words

Status
Not open for further replies.

tuli

Electrical
Joined
Feb 20, 2003
Messages
16
Location
US
Hello,

I simply need to read an ascii file that consists of a number of names into an array in Matlab.

say the file is:

aaa
bbb
ccc
....


I need to create an array aa in matlab where aa(1)='aaa', a2='bbb' .... and where the values ARE NOT CELLS but strings

thank you
 
Hello,
I don't think that adresses the issue.
Let me try again: I have a file with strings in it. Matlab does not know they are strings. They are NOT defined as "aaa", "bbb" ... but aaa, bbb ...
Matlab has to read the list in the file and assign them to an array of strings
 
"I have a file with strings in it. "

>> So, use one of the many Matlab file I/O functions:
"Matlab does not know they are strings. "

>> You're the programmer, you know they're strings and you use variables and functions to process strings.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top