Created
February 7, 2023 14:45
-
-
Save RobertTalbert/0d6042b7c5d88b5a0978b29cce7a670d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Function to create a random nxn upper triangular matrix | |
def randUT(n,lower,upper): | |
A = randMatrix(n,n,lower,upper) | |
for j in range(n-1): | |
for i in range(j+1,n): | |
A[i,j] = 0 | |
return A | |
# Code to test this out | |
A = randUT(5,-10,10) | |
A |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment