public MagicMatrixOutputInput(MWArray[] input)
 {
     this.Matrix       = Utility.MWArrayToMatrix(input[0]);
     this.Determinant  = Utility.MWArrayToDouble(input[1]);
     this.Eigenvalues  = Utility.MWArrayToVector(input[2]);
     this.Eigenvectors = Utility.MWArrayToMatrix(input[3]);
     this.InputDetails = Utility.ConvertMWObjectToClass <MagicMatrixInput>(input[4]);
 }
        public MagicMatrixOutputInput MakeSquare_structInputOutput(MagicMatrixInput input)
        {
            // the MATLAB function requires structure
            // the input is passed into MATLAB as an object with identical properties
            var inputMatlab = new MWObjectArray(input);
            var result      = this.Matlab.makesquare_in_out_structure(inputMatlab);
            var output      = new MagicMatrixOutputInput(Utility.GetMWStructureFields(result));

            return(output);
        }