This function returns a second difference matrix of size \(n\).

second_diff_mat(n)

Arguments

n

An integer. The size of the returned matrix.