[Date Index] [Thread Index] [Author Index]
Re: how to make arrays from text file in mathematica??
Hi, simply try e.g.: Import[filename, "Table"] Mathematica is smart enough (version 7) to distinguish between strings and values. Danile Nishant wrote: > Hi > Iv searched for this on the wolfram tutorials but could not find an answer to this. > What I have to do is to convert a text file having a format like this: > a b 123 > into a graph with a and b as the nodes and 123 as the weight.. > I thought of putting a and b in an array and 123 as the value and then creating a graph from it..the problem is Readlist would read each line as a separate record..and hence making an array out of it is seemingly difficult.. > What could be the solution?? >