Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'numerical list' topicStudent Support Forum > General > "numerical list"

Next Comment >Help | Reply To Topic
Author Comment/Response
fiore
04/04/03 11:06am


I TRY:


In[1]:=
mlist = Table[c[i] = i, {i, 0.1, 2., 0.1}]

Out[1]=
{0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, \
1.6, 1.7, 1.8, 1.9, 2.}


AND SO I THINK I GET A LIST FOR EVERY c[i], WHIT i RUNNING FROM 0.1 UNTIL 2.0 WITH STEP 0.1, FOR EXAMPLE

In[2]:= c[0.1]

Out[2]= 0.1


BUT...(!):


In[3]:= c[0.3]

Out[3]= c[0.3]

(and not 0.3!!)


SO I DISCOVER THAT...



In[5]:= FullForm[mlist ]

Out[5]//FullForm=
List[0.1`, 0.2`, 0.30000000000000004`, 0.4`, 0.5`, 0.6000000000000001`, \
0.7000000000000001`, 0.8`, 0.9`, 1.`, 1.1`, 1.2000000000000002`, 1.3`, \
1.4000000000000001`, 1.5`, 1.6`, 1.7000000000000002`, 1.8`, \
1.9000000000000001`, 2.`]



In[6]:=
c[0.30000000000000004`]

Out[6]=
0.3

SO I HAVE A LIST, BUT NOT THAT I WOULD LIKE TO HAVE...

HOW CAN I DO?

THANKS

fiore

URL: ,

Subject (listing for 'numerical list')
Author Date Posted
numerical list fiore 04/04/03 11:06am
Re: numerical list fiore 04/14/03 08:49am
Next Comment >Help | Reply To Topic