Pass matrix by reference and edit the first column.

add_to_col(x, col, y)

Arguments

x

Integer matrix

col

Index of col to modify

y

value to add