-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadMat.py
More file actions
47 lines (32 loc) · 766 Bytes
/
readMat.py
File metadata and controls
47 lines (32 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import scipy.io as io
def printBijection(database, aliasName):
print "============================"
print "case alias : ", aliasName
print "source : "
print database[aliasName]['sourceDir']
print "target : "
print database[aliasName]['targetDir']
print ""
d = io.loadmat('dataBase')
print "read from *.mat"
print "keys : ", d.keys()
d.pop("__header__")
d.pop("__globals__")
d.pop("__version__")
print "after removing extra keys other than case alias"
print "keys : ", d.keys()
#for alias in d:
# printBijection(d, alias)
a = d['D1-1d']
print "a"
print a
print "a.dtype"
print a.dtype
print "a.size"
print a.size
print "a.shape"
print a.shape
print "a[0][0]"
print a[0][0]
print "a['sourceDir']"
print a['sourceDir']