(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 4.0, MathReader 4.0, or any compatible application. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 5310, 190]*) (*NotebookOutlinePosition[ 5987, 214]*) (* CellTagsIndexPosition[ 5943, 210]*) (*WindowFrame->Normal*) Notebook[{ Cell["\<\ You may create lists with the curly braces, { }, and do operations on the \ entire list. Remember that % represents the previous output, and %% would \ refer to the second to the last output.\ \>", "Section", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ \(mylist\ = \ {5, 3, 7.1, \(-3.23\), 4}\)], "Input"], Cell[BoxData[ \(%\^2\ + \ 5\)], "Input"], Cell[BoxData[ \(%% s\ - \ 3\)], "Input"], Cell[BoxData[ \(mylist\^3\)], "Input"], Cell[BoxData[ \(mylist\ s\ - \ 3\)], "Input"], Cell[BoxData[ \(Clear[mylist]\)], "Input"], Cell["\<\ You can also create lists using the Table function, and access individual \ elements of the list by using the special brackets, \[LeftDoubleBracket] \ \[RightDoubleBracket]. Again, try to change some values after you have seen \ the output to see how it affects the particular list.\ \>", "Section", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ \(list2\ = \ Table[j\^2, \ {j, \ 1, 10}]\)], "Input"], Cell[BoxData[ \(list2\[LeftDoubleBracket]3\[RightDoubleBracket]\)], "Input"], Cell[BoxData[ \(list3\ = \ Table[Sin[\(\(2 \[Pi]\)\/3\) i], {i, 0, \ 3, 1\/2}]\)], "Input"], Cell[BoxData[ \(list3\[LeftDoubleBracket]6\[RightDoubleBracket]\)], "Input"], Cell[BoxData[ \(Clear\ [list2, list3]\)], "Input"], Cell["\<\ Lists of lists can also be defined using the Table function. To see the \ Table in a more \"natural\" form, try the function TableForm.\ \>", "Section", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ \(list4\ = \ Table[{p, \@p, \ \@p\%3}, {p, 20, 40}]\)], "Input"], Cell[BoxData[ \(TableForm[list4]\)], "Input"], Cell[BoxData[ \(Clear[list4]\)], "Input"], Cell["\<\ A vector can be thought of as just another list, and you can do scalar \ multiplication, addition and subtraction as you might expect. The dot \ product is found by using a period, . , as the operator between the two \ lists, and the cross product is a \"cute x\", \[Times], which can be found on \ the BasicInput palette.\ \>", "Section", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ \(v\ = \ {3, 4, \(-5.1\)}; \ a\ = \ {\(-8.2\), 4, \(-0.7\)};\)], "Input"], Cell[BoxData[ \(5 v\)], "Input"], Cell[BoxData[ \(v + a\)], "Input"], Cell[BoxData[ \(3\ a\ - \ v\^2\)], "Input"], Cell[BoxData[ \(v . a\)], "Input"], Cell[BoxData[ \(v\[Times]a\)], "Input"], Cell[BoxData[ \(Clear[v, a]\)], "Input"], Cell["\<\ Matrices are just lists of lists. You can do operations analagous to the \ ones above with vectors. You can also employ the functions TraditionalForm, \ Inverse, and Tranpose.\ \>", "Section", FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ \(\(matr1\ = {{3, 4, 5}, {\(-2\), \(-1\), 7}, {\(-5\), 2, 1}};\)\)], "Input"], Cell[BoxData[ \(TraditionalForm[matr1]\)], "Input"], Cell[BoxData[ \(matr1\[LeftDoubleBracket]3\[RightDoubleBracket]\)], "Input"], Cell[BoxData[ \(matr1\[LeftDoubleBracket]2, 3\[RightDoubleBracket]\)], "Input"], Cell[BoxData[ \(matr2\ = \ Inverse[matr1]\)], "Input"], Cell[BoxData[ \(TraditionalForm[matr2]\)], "Input"], Cell[BoxData[ \(matr3\ = \ matr1\[Times]matr2\)], "Input"], Cell[BoxData[ \(TraditionalForm[matr3]\)], "Input"], Cell[BoxData[ \(matr4\ = \ matr1 . matr2\)], "Input"], Cell[BoxData[ \(TraditionalForm[matr4]\)], "Input"], Cell[BoxData[ \(matr5\ = \ Transpose[matr1]\)], "Input"], Cell[BoxData[ \(TraditionalForm[matr5]\)], "Input"], Cell[BoxData[ \(Clear[matr1, matr2, matr3, matr4, matr5]\)], "Input"] }, FrontEndVersion->"4.0 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, CellGrouping->Manual, WindowSize->{545, 563}, WindowMargins->{{Automatic, 175}, {Automatic, 6}} ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[1717, 49, 251, 5, 95, "Section"], Cell[1971, 56, 71, 1, 30, "Input"], Cell[2045, 59, 45, 1, 30, "Input"], Cell[2093, 62, 46, 1, 30, "Input"], Cell[2142, 65, 42, 1, 30, "Input"], Cell[2187, 68, 50, 1, 30, "Input"], Cell[2240, 71, 46, 1, 30, "Input"], Cell[2289, 74, 342, 6, 116, "Section"], Cell[2634, 82, 72, 1, 31, "Input"], Cell[2709, 85, 80, 1, 30, "Input"], Cell[2792, 88, 104, 2, 42, "Input"], Cell[2899, 92, 80, 1, 30, "Input"], Cell[2982, 95, 54, 1, 30, "Input"], Cell[3039, 98, 195, 4, 95, "Section"], Cell[3237, 104, 83, 1, 35, "Input"], Cell[3323, 107, 49, 1, 30, "Input"], Cell[3375, 110, 45, 1, 30, "Input"], Cell[3423, 113, 382, 7, 137, "Section"], Cell[3808, 122, 93, 1, 30, "Input"], Cell[3904, 125, 37, 1, 30, "Input"], Cell[3944, 128, 38, 1, 30, "Input"], Cell[3985, 131, 48, 1, 30, "Input"], Cell[4036, 134, 38, 1, 30, "Input"], Cell[4077, 137, 43, 1, 30, "Input"], Cell[4123, 140, 44, 1, 30, "Input"], Cell[4170, 143, 236, 5, 95, "Section"], Cell[4409, 150, 109, 2, 30, "Input"], Cell[4521, 154, 55, 1, 30, "Input"], Cell[4579, 157, 80, 1, 30, "Input"], Cell[4662, 160, 83, 1, 30, "Input"], Cell[4748, 163, 59, 1, 30, "Input"], Cell[4810, 166, 55, 1, 30, "Input"], Cell[4868, 169, 63, 1, 30, "Input"], Cell[4934, 172, 55, 1, 30, "Input"], Cell[4992, 175, 58, 1, 30, "Input"], Cell[5053, 178, 55, 1, 30, "Input"], Cell[5111, 181, 61, 1, 30, "Input"], Cell[5175, 184, 55, 1, 30, "Input"], Cell[5233, 187, 73, 1, 30, "Input"] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)