MatrixD originalMatrix = new MatrixD(3, 3); originalMatrix[0, 0] = 1; originalMatrix[0, 1] = 2; originalMatrix[0, 2] = 3; originalMatrix[1, 0] = 4; originalMatrix[1, 1] = 5; originalMatrix[1, 2] = 6; originalMatrix[2, 0] = 7; originalMatrix[2, 1] = 8; originalMatrix[2, 2] = 9; MatrixD clonedMatrix = originalMatrix.Clone() as MatrixD;In this example, we create an instance of the MatrixD class and populate it with values. We then use the Clone method to create a duplicate of the matrix and assign it to a new variable. The MatrixD class is part of the MathNet.Numerics library for C#.