public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     try {
         Mathematics.Matrix matrix = (Mathematics.Matrix)value;
         return(matrix.ToString());
     }
     catch {
         return("Unknow");
     }
 }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            Mathematics.Matrix matrix = (Mathematics.Matrix)value;
            if (matrix is null)
            {
                return(null);
            }
            List <Mathematics.RationalNumber> elementArray = new List <Mathematics.RationalNumber>();

            for (int row = 0; row < matrix.RowSize; row++)
            {
                for (int col = 0; col < matrix.ColumnSize; col++)
                {
                    elementArray.Add(matrix[row, col]);
                }
            }
            return(elementArray);
        }