0
$\begingroup$

How do I make a phase portrait which looks like the ones demonnstrated here? Not the fancy version where I can use the controls to change it, just a screen-shotted version of say a spiral point? Any help would be massively appreciated!

http://demonstrations.wolfram.com/PhasePortraitAndFieldDirectionsOfTwoDimensionalLinearSystems/

$\endgroup$
  • $\begingroup$ Why don't you download the demonstration and study the code it contains? $\endgroup$ – m_goldberg Mar 12 '15 at 11:43
  • $\begingroup$ Use StreamPlot function. $\endgroup$ – Vladimir Mar 12 '15 at 11:46
  • $\begingroup$ Basins of Attraction $\endgroup$ – Artes Mar 12 '15 at 12:27
  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$ – bbgodfrey Mar 23 '15 at 4:05
1
$\begingroup$

Taking the code practically straight out of the author's demo:-

m = {{1, -3.5}, {2, -2}};

pt1 = {-5.1, 4.8};
pt2 = {4.9, 5.1};
pt3 = {-4.9, -5};
pt4 = {4.9, -5.2};

Show[VectorPlot[m.{x, y}, {x, -10, 10}, {y, -10, 10},
  StreamPoints -> {{pt1, pt2, pt3, pt4}},
  StreamStyle -> {Red, Thick}, ImageSize -> {460, 310}],
 Graphics[
  {Thick, Orange, Map[Line[{-100 #, 100 #}] &,
    Select[Eigenvectors[m], (Im[#[[1]]] == 0 && Im[#[[2]]] == 0) &]]}],
 PlotLabel -> Row[{Column[{Row[{Column[
         {Style["\!\(\*OverscriptBox[\(x\), \(.\)]\)", Italic], 
          Style["\!\(\*OverscriptBox[\(y\), \(.\)]\)", Italic]}],
        Column[{" = ", " = "}],
        TableForm[m.{Style["x", Italic], Style["y", Italic]}] // N}]}], "  ", 
    Column[{"Eigenvalues:", 
      NumberForm[Chop@N@Eigenvalues[m], {4, 2}]}], "  ", , 
    Column[{"Eigenvectors:", 
      NumberForm[Chop@N@Eigenvectors[m][[1]], {4, 2}], 
      NumberForm[Chop@N@Eigenvectors[m][[2]], {4, 2}] }]}]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.