1

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/

LCarvalho
  • 9,233
  • 4
  • 40
  • 96
user26928
  • 23
  • 3

1 Answers1

2

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

Chris Degnen
  • 30,927
  • 2
  • 54
  • 108