Gaussian Elimination Lab (Week 2)

When creating a post, please add:

[[ 0 5 -3 6 8]
[ 0 6 3 8 1]
[ 0 0 0 0 0]
[ 0 0 0 1 7]
[ 0 2 1 0 4]]

For the above message, Jupyter is returning the wrong values…

print(get_index_first_non_zero_value_from_column(N, column = 1, starting_row = 1))
Output: 1

The output should be 6

Additionally, no matter the request there isn’t a pattern within the matrix to the values that are being returned. There appears to be an error within the notebook.

Correct Labeling:
C: 0 1 2 3 4
R: 0 [[ 0 5 -3 6 8]
1 [ 0 6 3 8 1]
2 [ 0 0 0 0 0]
3 [ 0 0 0 1 7]
4 [ 0 2 1 0 4]]

print(get_index_first_non_zero_value_from_column(N, column = 1, starting_row = 1))
Correct Output: 6 - First Non Zero Value

Please provide assistance

I think the problem here is that you are misinterpreting what the function is doing: it does not return the value, it returns the index (row number) of the value. Which is 1 in that case, right?

The name is get_index_first_non_zero_value_from_column.

smh, you’re absolutely right. thank you