Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'formatted reading from a file' topicStudent Support Forum > General > Archives > "formatted reading from a file"

Next Comment >Help | Reply To Topic
Author Comment/Response
tosbaga-x
02/22/07 09:03am

I have an input data file as below,
9
2
1 -1.00000 1.00000
2 -1.00000 0.00000
3 -1.00000 -1.00000
4 0.00000 1.00000
5 0.00000 0.00000
6 0.00000 -1.00000
7 1.00000 1.00000
8 1.00000 0.00000
9 1.00000 -1.00000
1 1 2 3 4 5 6
2 4 5 6 7 8 9
200.*10^9
0.0000

I want to assign these datas like
t=9
s=2
x[1]=-1.000000
y[1]=1.00000
x[2]=-1.000000
y[2]=0.00000
x[3]=-1.000000
y[3]=-1.00000
x[4]=0.000000
y[4]=1.00000
x[5]=0.000000
y[5]=0.00000
x[6]=0.000000
y[6]=-1.00000
x[7]=1.000000
y[7]=1.00000
x[8]=1.000000
y[8]=0.00000
x[9]=1.000000
y[9]=-1.00000
sd[1]={1,2,3,4,5,6}
sd[2]={4,5,6,7,8,9}

is it posibble to assign datas from a txt file like this example?

URL: ,

Subject (listing for 'formatted reading from a file')
Author Date Posted
formatted reading from a file tosbaga-x 02/22/07 09:03am
Re: formatted reading from a file yehuda ben-s... 02/26/07 11:19pm
Re: Re: formatted reading from a file tosbaga-x 03/01/07 06:32am
Next Comment >Help | Reply To Topic