I am trying to convert a python nested-list into a matlab-cell in python. My python nested-list contains only strings.
This is my list:
x = [['a', 'b'],['d','e']]
type(x)
list
This was my attempt to pass it as matlab cell:
import matlab.engine
import matlab
eng = matlab.engine.start_matlab()
y = eng.cell(x)
type(y)
list
This approach fails, since the type of y is still a list.
Another attempt with an error:
y = eng.cellstr(x)
Error using cellstr (line 44)
Element 1 is not a string scalar or character array. All elements of cell input must be
string scalars or character arrays.
Any suggestion here is appreciated, thanks in advance!