コード例 #1
0
ファイル: mxStructArray.cs プロジェクト: dacho68/matlabapi
        public override Array ToArray()
        {
            int r = this.M, c = this.N, fieldCount = this.FieldCount;

            mxCellArray[,] array = new mxCellArray[r, c];

            for (int i = 0; i < r; i++)
            {
                for (int j = 0; j < c; j++)
                {
                    mxCellArray cell = new mxCellArray(fieldCount);
                    for (int x = 0; x < fieldCount; x++)
                    {
                        cell.SetCell(0, this.GetField(i, j, x));
                    }
                    array[i, j] = cell;
                }
            }

            return(array);
        }
コード例 #2
0
ファイル: mxStructArray.cs プロジェクト: hein13/matlabapi
        public override Array ToArray()
        {
            int r = this.M, c = this.N, fieldCount = this.FieldCount;
            mxCellArray[,] array = new mxCellArray[r, c];

            for (int i = 0; i < r; i++) {
                for (int j = 0; j < c; j++) {
                    mxCellArray cell = new mxCellArray(fieldCount);
                    for (int x = 0; x < fieldCount; x++) {
                        cell.SetCell(0, this.GetField(i, j, x));
                    }
                    array[i, j] = cell;
                }
            }

            return array;
        }