I am very new to matlab and python and need to use some values in python from the matlab cell array.
I have a cell array of integers that after i execute this line of code and print the result, i get this:
a = loadmat('file.mat')
print a
{'__version__': '1.0', '__header__': 'MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Wed Sep 21 15:30:15 2011', 'juncForward_c': array([[ [[ [[ ([[30]], **[[91], [87]]**, [[3]], [[2.2455372690184494, 3.6052402625905993, 5.5884470309828833]], [[14.0, 4.0, 15.4]], [[-1, -1, 2]], [[91, 89, 93], [88, 85, 86]], [[500, 500, 5]], [[1, 2, 3]], [[11.133333333333333]], **[[4]]**, [[1]], [[1]], [[1.0], [20.365168528421695]])]]
[[ ([[30]], **[[99], [80]]**, [[3]], [[4.0376480381611373, 2.3561944901923448, 6.0857897473297058]], [[10.0, 15.4, 16.600000000000001]], [[-1, 1, 3]], [[98, 98, 100], [79, 81, 80]], [[500, 6, 33]], [[1, 2, 3]], **[[14]]**, [[2]], [[1]], [[1]], [[2.0], [6.6573267908372973]])]]
and the print out continues on.
Could someone explain to me how the cell array is arranged? (so how many dimensions is the above?)
I then have a few questions: 1) Within this cell array, there are variables 'label' and 'coordinates' that are assigned to one array/cell (i dont know which is the actual term to use) -- the values in bold. I would like to write in Python to access this values. How should I go about it?
2)
To test, I tried this -> juncInfoF = a.get('juncForward_c')
and when i try to print juncInfoF, it prints 'None'. Why is that so? I am puzzled because previously when i tried this, it works. I could even do this -> print juncInfo[0][9][0][0]
. but now I cannot even do any of the above.