# Update

Solve[N[Table[BernoulliB[n, z], {n, 10, 10}] == 0]]

{{z -> -0.5841145496910024 - 0.435309007896589 I}, <<4>>}


I am then finding and replacing z -> with blank to get :

{{-0.5841145496910024 - 0.435309007896589 I}, <<4>>}


I am then finding and replacing  I} with } to get :

{{-0.5841145496910024-0.435309007896589}, <<4>>}


I am then finding and replacing ' with , to get :

{{-0.5841145496910024, -0.435309007896589}, <<4>>}


My question is, is there a way of doing this without all of the find & replace business?

# Old

I am generating a list from :

Solve[N[Table[BernoulliB[n, z], {n, 100, 100}] == 0]]


And then manually finding and replacing elements in the generated list such as z -> with Blank, then finding and replacing , I} with }, and so on. I am then producing a list plot form the resultant array. Is there a way of automating this process and producing a list plot directly?

• What do you mean by " replacing , I} with },"?
– Kuba
Commented Oct 17, 2013 at 7:06
• ({Re@z, Im@z} /. sol) // ListPlot ?
– Kuba
Commented Oct 17, 2013 at 7:28
• Am I missing something: what's the purpose of using Table here? Why not just Solve[N@BernoulliB[10, z] == 0, z]? Commented Oct 17, 2013 at 14:33

First part of your question is answered in What are the most common pitfalls awaiting new users?.

How to plot complex points is described for example here.

What you need is what was my guess:

sol = Solve[N[Table[BernoulliB[n, z], {n, 10, 10}] == 0]];

{Re@z, Im@z} /. sol // ListPlot


• @ Kuba Many thanks! This has saved me a great deal of time! Commented Oct 17, 2013 at 7:53
• And congratulations on 10k. Really fast! Commented Oct 17, 2013 at 7:56
• @cormullion Thank you, I enjoy being here :) Fast?, take a look at ybeltukov's rate :P
– Kuba
Commented Oct 17, 2013 at 8:00

If you use David Park's Presentations add-on (http://home.comcast.net/~djmpark/DrawGraphicsPage.html), then there's no need for the artificial pulling apart of the complex roots into their real and imaginary parts; you can just treat complex numbers as complex numbers:

<< Presentations

pts = z /. Solve[N@BernoulliB[10, z] == 0, z]
Draw2D[{PointSize[Medium], ComplexPoint /@ pts}, Axes -> True]


• @ Murray Many thanks for your comment - will look into it. Commented Oct 17, 2013 at 17:48

Using ComplexListPlot (new in 12.0)

sol = Solve[N[Table[BernoulliB[n, z], {n, 10, 10}] == 0]];

ComplexListPlot[Callout[#, Round[#, 0.01]] & /@ Flatten @ Values[sol],
AspectRatio -> 1/2,
AxesOrigin -> {-1, 0},
PlotTheme -> "Detailed"]


More points:

sol = Solve[N[Table[BernoulliB[n, z], {n, 50, 50}] == 0]];

ComplexListPlot[Values @ sol,
AspectRatio -> 1,
GridLines -> Automatic,
PlotStyle -> Red]
`