(* Content-type: application/mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 6.0' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 145, 7]
NotebookDataLength[ 3736, 100]
NotebookOptionsPosition[ 3317, 81]
NotebookOutlinePosition[ 3681, 97]
CellTagsIndexPosition[ 3638, 94]
WindowFrame->Normal
ContainsDynamic->False*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[CellGroupData[{
Cell["Creating a toolbox", "Title",
CellChangeTimes->{{3.3918893128898463`*^9, 3.3918893187482705`*^9}, {
3.3920485538593245`*^9, 3.392048560368685*^9}}],
Cell["\<\
A substantial number of researchers want to use Mathemnatica rather like a \
sophisticated calculator. After all, in a fraction of a second it can perform \
algebraic or calculus operations which would require days or weeks of effort \
- and it is far more accurate than a human being could ever be.
However, you are unlikely to get the best from Mathematica if you regularly \
start each session with an empty notebook. For example, suppose for your \
application you wanted to enter r/theta pairs (using degrees, not radians) \
and for them to automatically convert to x/y vectors using Real numbers. You \
might enter a definition such as:\
\>", "Text",
CellChangeTimes->{
3.392048620915747*^9, {3.392048732666437*^9, 3.392048754808275*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{
RowBox[{"polar", "[",
RowBox[{"r_", ",", "theta_"}], "]"}], ":=",
RowBox[{"{",
RowBox[{
RowBox[{"r", " ",
RowBox[{"Cos", "[",
RowBox[{"theta", " ", "Degree"}], "]"}]}], ",",
RowBox[{"r", " ",
RowBox[{"Sin", "[",
RowBox[{"theta", " ", "Degree"}], "]"}]}]}], "}"}]}], ";"}]], "Input",
CellChangeTimes->{{3.392048620915747*^9, 3.3920486405940433`*^9},
3.3920488404714527`*^9}],
Cell[TextData[{
"This would enable you to enter terms such as polar[4.5,30], and obtain a \
regular Mathematica list representation of an x/y vector. This is fine, but \
people often look at a definition such as this and ask if it is really worth \
entering even such a simple definition (and debugging it!) just to convert a \
few vectors. Possibly they even start doing it explicitly to save the bother \
of setting up the function.\n\nIt is ",
StyleBox["vital",
FontVariations->{"Underline"->True}],
" to realise that to use Mathematica effectively, you should build up a \
notebook (effectively your toolbox) of definitions that you enter each time \
you start Mathematica. This code will gradually grow as you learn more \
techniques, and it means that Mathematica becomes better and better at \
solving your particular problems.\n\nIt is even possible to arrange for code \
to be executed automatically as Mathematica starts up. This can be extremely \
useful, but in the early stages it may be better to execute your start-up \
code explicitly, just so that you remember what it is you are doing."
}], "Text",
CellChangeTimes->{{3.392048620915747*^9, 3.3920486405940433`*^9}, {
3.392048692678938*^9, 3.3920486936803775`*^9}, {3.392048759154525*^9,
3.3920488337818336`*^9}, 3.392052512761947*^9}]
}, Open ]]
},
WindowSize->{977, 750},
WindowMargins->{{127, Automatic}, {Automatic, 65}},
ShowSelection->True,
FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (March 26, 2007)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)
(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[590, 23, 156, 2, 83, "Title"],
Cell[749, 27, 759, 13, 101, "Text"],
Cell[1511, 42, 471, 14, 28, "Input"],
Cell[1985, 58, 1316, 20, 173, "Text"]
}, Open ]]
}
]
*)
(* End of internal cache information *)