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

Info iconThis preview shows pages 1–3. 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 7.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 105596, 1646] NotebookOptionsPosition[ 105154, 1626] NotebookOutlinePosition[ 105497, 1641] CellTagsIndexPosition[ 105454, 1638] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell["\<\ This shows how to visualize a 2d vectorfield in Mathematica. You may use whatever software you like for you homework.\ \>", "Text", CellChangeTimes->{{3.464046966234375*^9, 3.46404702696875*^9}, { 3.46678824728125*^9, 3.466788279671875*^9}}, FontSize->16], Cell[CellGroupData[{ Cell[TextData[StyleBox["Visualize a 2d vector field (for example from the \ Volterra model):", FontColor->RGBColor[1, 0, 0]]], "Subsection", CellChangeTimes->{{3.463944415*^9, 3.463944455609375*^9}, { 3.46401686409375*^9, 3.4640168645*^9}, {3.466788266109375*^9, 3.46678830396875*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"f", "[", RowBox[{"x_", ",", "y_"}], "]"}], "=", RowBox[{"x", "-", RowBox[{"x", " ", "y"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"g", "[", RowBox[{"x_", ",", "y_"}], "]"}], "=", RowBox[{ RowBox[{"x", " ", "y"}], "-", "y"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"StreamPlot", "[", " ", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], ",", RowBox[{"g", "[", RowBox[{"x", ",", "y"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", " ", "0", ",", "2"}], "}"}], ",",
Background image of page 1

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

View Full DocumentRight Arrow Icon
RowBox[{"{", RowBox[{"y", ",", "0", ",", "2"}], "}"}], ",", RowBox[{"StreamPoints", "\[Rule]", "20"}], ",", RowBox[{"StreamScale", "\[Rule]", "Large"}]}], "]"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.46662168065625*^9, 3.466621769921875*^9}, { 3.46662184284375*^9, 3.46662186734375*^9}}], Cell[BoxData[ GraphicsBox[{{}, { {Hue[0.67, 0.6, 0.6], {Arrowheads[{{0.04, 1.}}], ArrowBox[{{0.5830156832884476, 0.5550235673148326}, {0.6012099979610652, 0.5398958013538415}, {0.6205993506466301, 0.5258198931074194}, { 0.6411837413451423, 0.5127958425755661}, {0.6629631700566024, 0.5008236497582814}, {0.6859376367810097, 0.48990331465556564`}, { 0.7101071415183646, 0.48003483726741863`}, {0.7429499083212763, 0.46883023631839615`}, {0.778001152196935, 0.4591610740301019}, { 0.8152608731453406, 0.45102735040253594`}, {0.8550369908515151, 0.44477504180012034`}, {0.8757532263550861, 0.4421802200829118}, { 0.8908772602867868, 0.4406180805209637}}]}, {Arrowheads[{{0.04, 1.}}], ArrowBox[{{0.8991852761990556, 0.43980457833955244`}, { 0.9190454297918131, 0.4381766831587327}, {0.9416030299729923, 0.43679582576777437`}, {0.9647560506280648, 0.43584748096824494`}, { 0.9884953078810417, 0.4353455776681505}, {1.012811617855935, 0.4353040447754972}, {1.0376957966767568`, 0.43573681119829105`}, { 1.0631937996393708`, 0.43662991894538766`}, {1.0893315314316945`,
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 26

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

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

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