public Header(byte[] bytes)
        {
            if (bytes.Length != 128)
                throw new IOException("Matlab header should be 128 charachters");

            char[] textChars = new char[116];
            Array.Copy(bytes, textChars, 116);
            this.text = new String(textChars);

            ushort version = (ushort)(bytes[125] << 8 + bytes[124]);
            if (version != 0x0100)
                throw new IOException("Unsupported version of matlab file");
            this.version = MatfileVersion.MATFILE_5;
        }
Exemple #2
0