Distance Function between two matrices for optimization searching of positive definite matrix.
PositiveDefiniteOptimizationFn(x, original)
x: a vector that contains elements in the upper triangular part of the adjusted variance covariance matrix.
original: a vector that contains elements in the upper triangular part of the original variance covariance matrix.
a numerica value of distance
It returns a distance between the new matrix and the original matrix. If the new matrix contains negative element or is not positive definite, then it will return more penalty for the distance.