MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: ugly Plot Eigenvalues ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39667] Re: ugly Plot Eigenvalues ?
  • From: BobHanlon at aol.com
  • Date: Sat, 1 Mar 2003 02:47:26 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com


In a message dated 2/28/03 9:05:34 AM, Pavel.Pokorny at vscht.cz writes:


> How can I plot Re Eigenvalues as a function of a parameter
> without unwanted ugly connections between branches?
> In the example (computed by Mathematica 4.2 for HP-UX PA-RISC)
>
>    m1={{8., 8, 7}, {0, 5, 5}, {8, 0, 0}}
>    m2={{6., 0, 6}, {10, 8, 3}, {5, 8, 6}}
>    Plot[Evaluate[Re[Eigenvalues[m1+w*m2]]], {w,-3,3}];
>
> for w approximately -0.4 there is an unwanted vertical bar.
> This is related to "ordering" of solutions to equation.
>
> Is there a simple nice solution for this and related examples?
> (taking exact numbers in the example above avoids the unwanted connection,
> but this is not a good solution for a general machine precission problem)
>
One approach is just to avoid the ordering issue by using a high density
ListPlot

m1={{8.,8,7},{0,5,5},{8,0,0}};

m2={{6.,0,6},{10,8,3},{5,8,6}};



ListPlot[Flatten[Table[

         {w, #}& /@ Re[Eigenvalues[m1+w*m2]],

         {w, -3, 3, .01}], 1],

     Frame -> True,Axes -> False,

     PlotRange -> {-20, 20},

     PlotStyle -> {AbsolutePointSize[1]}];



Bob Hanlon



  • Prev by Date: Re: Re: visualizing Map, Thread, Apply
  • Next by Date: Re: visualizing Map, Thread, Apply, etc.
  • Previous by thread: Re: Re: Re: visualizing Map, Thread, Apply
  • Next by thread: RE: ugly Plot Eigenvalues ?