I\'m looking for a function that would allow me to replace values in a matrix, from a certain point moving diagonally upwards and downwards. I\'m currently working in C.