Python Forum
Problems with displaying a 15x15 Complex Matrix
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with displaying a 15x15 Complex Matrix
#1
Hi, I am trying to show a 15x15 matrix containing complex numbers as its elements. However, the output terminal isn't displaying it correctly in the terminal, as shown:


>>[
[ 30.581736 -522.6092j 0. +0.j
0. +0.j -5.2196026 +88.97953j
0. +0.j 0. +0.j
-6.1544657 +105.12492j 0. +0.j
0. +0.j 0. +0.j
-5.7376137 +97.70227j 0. +0.j
0. +0.j -4.917259 +84.45948j
-8.5527935 +146.34302j ]
[ 0. +0.j 30.2076 -527.4037j
0. +0.j 0. +0.j
0. +0.j -15.238797 +265.79297j
0. +0.j -14.9688015 +261.61072j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j ]
[ 0. +0.j 0. +0.j
31.134747 -531.70197j 0. +0.j
-18.598152 +317.3815j 0. +0.j
0. +0.j 0. +0.j
-12.536593 +214.32043j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j ]
[ -5.2196026 +88.97953j 0. +0.j
0. +0.j 38.95421 -666.3162j
-22.21316 +380.3822j 0. +0.j
-11.521447 +196.95448j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j ]
[ 0. +0.j 0. +0.j
-18.598152 +317.3815j -22.21316 +380.3822j
40.81131 -697.76373j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j ]
[ 0. +0.j -15.238797 +265.79297j
0. +0.j 0. +0.j
0. +0.j 71.4634 -1286.7814j
-0.44441602 +55.552002j -22.809872 +389.28848j
0. +0.j 0. +0.j
-32.970314 +576.14795j 0. +0.j
0. +0.j 0. +0.j
0. +0.j ]
[ -6.1544657 +105.12492j 0. +0.j
0. +0.j -11.521447 +196.95448j
0. +0.j -0.44441602 +55.552002j
55.30864 -994.1221j 0. +0.j
0. +0.j -23.2806 +398.6404j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
-13.907712 +237.85027j ]
[ 0. +0.j -14.9688015 +261.61072j
0. +0.j 0. +0.j
0. +0.j -22.809872 +389.28848j
0. +0.j 76.07937 -1366.5317j
-0.44441602 +55.552002j 0. +0.j
0. +0.j -37.856277 +660.08057j
0. +0.j 0. +0.j
0. +0.j ]
[ 0. +0.j 0. +0.j
-12.536593 +214.32043j 0. +0.j
0. +0.j 0. +0.j
0. +0.j -0.44441602 +55.552002j
38.72029 -709.34155j -17.910591 +305.6991j
0. +0.j 0. +0.j
-7.8286886 +133.77002j 0. +0.j
0. +0.j ]
[ 0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
-23.2806 +398.6404j 0. +0.j
-17.910591 +305.6991j 76.4139 -1307.1753j
-22.21316 +380.3822j 0. +0.j
-13.009555 +222.45346j 0. +0.j
0. +0.j ]
[ -5.7376137 +97.70227j 0. +0.j
0. +0.j 0. +0.j
0. +0.j -32.970314 +576.14795j
0. +0.j 0. +0.j
0. +0.j -22.21316 +380.3822j
148.98595 -2592.4004j -88.06486 +1538.1678j
0. +0.j 0. +0.j
0. +0.j ]
[ 0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j -37.856277 +660.08057j
0. +0.j 0. +0.j
-88.06486 +1538.1678j 126.36555 -2253.8005j
-0.44441602 +55.552002j 0. +0.j
0. +0.j ]
[ 0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
-7.8286886 +133.77002j -13.009555 +222.45346j
0. +0.j -0.44441602 +55.552002j
31.62149 -588.4755j -10.338832 +176.70003j
0. +0.j ]
[ -4.917259 +84.45948j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
-10.338832 +176.70003j 15.256091 -261.1595j
0. +0.j ]
[ -8.5527935 +146.34302j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
-13.907712 +237.85027j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
0. +0.j 0. +0.j
22.460506 -384.19327j ]]


Between each of the square brackets is supposedly a column array. However, the output is displaying it as a row.
Verified here:

num = Ybus[3,0]
print('\n\nThe element at row 4 column 1 is: ',num)
>>The element at row 4 column 1 is: (-5.2196026+88.97953j)

Thus, I have two issues that I hope you could help me with:
1) How could the matrix be visualized correctly?
2) Is there a way to fully utilise the row space of the output terminal? As each row only displays 2 elements as opposed to the intended 15...

Any response is much appreciated! Thank you in advance.
Reply


Messages In This Thread
Problems with displaying a 15x15 Complex Matrix - by JoelFooCJ - Sep-13-2019, 04:36 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Check if two matrix are equal and of not add the matrix to the list quest 3 1,006 Jul-10-2023, 02:41 AM
Last Post: deanhystad
  How to multiply a matrix with herself, until the zero matrix results peanutbutterandjelly 3 3,554 May-03-2021, 06:30 AM
Last Post: Gribouillis
  Problems displaying data sent from Arduino to Pi VostokRising 2 2,440 May-18-2019, 08:28 PM
Last Post: VostokRising
  matrix from matrix python numpy array shei7141 1 3,846 Jan-16-2017, 06:10 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020