Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS 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
Feb 20, 2003
16
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
 
Replies continue below

Recommended for 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