4) Mathematica as a programming language:

Conditionals

[Graphics:../HTMLFiles/index_67.gif]

Loops

[Graphics:../HTMLFiles/index_68.gif]

Naming and Finding Files

[Graphics:../HTMLFiles/index_69.gif]

[Graphics:../HTMLFiles/index_70.gif]

For Example

In[58]:=

SetDirectory["/Users/ross/talks/mathematica/sphere"] ; files = FileNames[]

Out[59]=

{mss_appx_000000h, mss_appx_000003h, mss_appx_000006h, mss_appx_000009h, mss_appx_000012h, mss ... 000033h, mss_appx_000036h, mss_appx_000039h, mss_appx_000042h, mss_appx_000045h, mss_appx_000048h}

In[60]:=

RowBox[{Do, [, RowBox[{RowBox[{{, <br />, RowBox[{data = ReadList[Directory[] <>"/& ... ,, ViewCenter {1/2, 1/2, 1/2}}], ]}], ;}], <br />, }}], ,, {n, 1, Length[files], 1}}], ]}]


Created by Mathematica  (June 17, 2004)