lecture2 - (* Content-type: application/mathematica *) (*...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
(* 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[ 27302, 1009] NotebookOptionsPosition[ 21320, 825] NotebookOutlinePosition[ 22315, 860] CellTagsIndexPosition[ 22113, 852] WindowFrame->Normal ContainsDynamic->False*) C (* Beginning of Notebook Content *) Notebook[{ Cell["\<\ Introduction to Mathematical Software 21-126 2 Lecture 2: Lists and Functions\ \>", "Subtitle", TextAlignment->Center], Cell[TextData[{ "\nMuch of this content comes from ", StyleBox[ButtonBox["Essential Mathematica for Students of Science", BaseStyle->"Hyperlink", Active->False, ButtonData:>{ URL["http://www.physics.umd.edu/courses/CourseWare/EssentialMathematica/"]\ , None}], Active->False], "\n\[Copyright] James J. Kelly, 1998" }], "Subsubtitle", CellChangeTimes->{{3.49183298654002*^9, 3.491832987538377*^9}}, TextAlignment->Center, TextJustification->0], Cell[CellGroupData[{ C Cell["Lists ", "Section", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ C Cell["Introduction ", "Subsection", Evaluatable->False, AspectRatioFixed->True, FontSize->12], Cell[TextData[{ "Lists are the fundamental data structure in ",
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
StyleBox["Mathematica", FontSlant->"Italic"], ". Lists can represent sets, vectors, matrices, or storage objects \ containing data of mixed type. " }], "Text", Evaluatable->False, AspectRatioFixed->True] }, Closed]], } Cell[CellGroupData[{ C Cell["Construction of Lists ", "Subsection", Evaluatable->False, AspectRatioFixed->True, FontSize->12], Cell["Lists containing consecutive integers are made with Range[] ", "Text", Evaluatable->False, AspectRatioFixed->True], Cell["Range[5] ", "Input", AspectRatioFixed->True], Cell["Range[7,20] ", "Input", AspectRatioFixed->True], Cell["A third argument to Range[] specifies the step size. ", "Text", Evaluatable->False, AspectRatioFixed->True], Cell["Range[-5,15,2] ", "Input", AspectRatioFixed->True], Cell["\<\ The Table[] command can be used to make more complicated lists \ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell["Table[Sin[i Pi/6], {i,0,6}] ", "Input", AspectRatioFixed->True], Cell["\<\ Note the use of the short list {i,0,6} as the second argument to Table[]. \ Many Mathematica commands use short lists. A fourth element in the list gives \ the step size. \ \>", "Text", Evaluatable->False, AspectRatioFixed->True], Cell["\<\ Clear[f] Table[3 f[i]^2, {i,0,8,2}] \ \>", "Input", AspectRatioFixed->True], Cell["New lists can be made from old by Join[]ing them together. ", "Text", Evaluatable->False, AspectRatioFixed->True],
Background image of page 2
Cell["\<\ ll = Range[-3,9,3] mm = Table[i^3,{i,2,4}] \ \>", "Input", AspectRatioFixed->True], Cell["\<\ Join[ll,mm] Join[ll,mm,{a,b,c}] \ \>", "Input", AspectRatioFixed->True] }, Closed]], } Cell[CellGroupData[{ C Cell["Manipulating Lists ", "Subsection",
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/19/2011 for the course MATH 21126 taught by Professor Johnson during the Spring '11 term at Carnegie Mellon.

Page1 / 18

lecture2 - (* Content-type: application/mathematica *) (*...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online