eigenvalues in Maple

225 Views Asked by At

I have to plot in the complex plane the eigenvalues of a random squared matrix of order 15 or more. How I approached it: generate a random n, then generate the matrix A=RandomMatrix(n,n), calculate Eigenvalues(A). And here I got stuck. How can I plot them? (I'm a begginer in Maple) Thank you!

1

There are 1 best solutions below

0
On

Your next step could consist of extracting the real and imaginary components of the Vector of eigenvalues.

If you construct a Matrix whose two columns are those real and imaginary components (respectively) then you can make a point-plot of the points represented by the rows of that n-by-2 Matrix.

For example,

restart;
randomize():
n := rand(15..30)();

M := LinearAlgebra:-RandomMatrix(n,generator=-1.0..1.0):

ev := LinearAlgebra:-Eigenvalues(M):

# n-by-2 Matrix whose two columns are
# the real and imaginary components
# of the complex Vector ev
dat := <Re(ev)|Im(ev)>:

plots:-pointplot(dat,color=red,symbol=solidcircle,symbolsize=12);