Creates a matrix such that all elements appertaining to the main diagonal of the created matrix are initialized with a given value.