Browse Source

data files

master
anapt 7 years ago
commit
961c7dcd72
  1. 41
      data/L.bin
  2. BIN
      data/X.bin
  3. 25
      data/readmat.py

41
data/L.bin

@ -0,0 +1,41 @@



BIN
data/X.bin

Binary file not shown.

25
data/readmat.py

@ -0,0 +1,25 @@
import scipy.io as sio
import numpy as np
from decimal import Decimal
mat_contents = sio.loadmat('r15.mat')
# X 600 x 2 double
oct_a = mat_contents['X']
print(type(oct_a))
print(type(oct_a[0][0]))
np.ndarray.tofile(oct_a, "X.bin")
# L 600 x 1 double (but actually int)
oct_b = mat_contents['L']
print(len(oct_b))
print(type(oct_b))
print(type(oct_b[0][0]))
# output is <class 'numpy.uint8'>
# uint8 : Unsigned integer (0 to 255)
print(oct_b[0][0])
np.ndarray.tofile(oct_b, "L.bin")
Loading…
Cancel
Save