User Profile

Collapse

Profile Sidebar

Collapse
thosuperman
thosuperman
Last Activity: May 13 '16, 03:43 PM
Joined: May 13 '16
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Here is the solution

    Code:
    matrix_test = [[0.0 for i in range(5)] for i in range(10)]
    for x in range(5):
        matrix_test [2 * x][x] = 1.0
        matrix_test [2 * x + 1][x] = -1.0
    See more | Go to post

    Leave a comment:


  • Need to help in create the matrix AxB in python

    I need to create matrix AxB
    The requirement is as sample below
    This is the 5x10 matrix that I need

    Code:
    [1.0, 0.0, 0.0, 0.0, 0.0],
    [-1.0, 0.0, 0.0, 0.0, 0.0],
    [0.0, 1.0, 0.0, 0.0, 0.0],
    [0.0, -1.0, 0.0, 0.0, 0.0],
    [0.0, 0.0, 1.0, 0.0, 0.0],
    [0.0, 0.0, -1.0, 0.0, 0.0],
    [0.0, 0.0, 0.0, 1.0, 0.0],
    [0.0, 0.0, 0.0, -1.0, 0.0],
    [0.0, 0.0, 0.0, 0.0, 1.0],
    [0.0, 0.0, 0.0, 0.0, -1.
    ...
    See more | Go to post
No activity results to display
Show More
Working...