MATLAB Examples

Create Python dict Variable

This example shows how to create a dict variable to pass to a Python® function.

studentID = py.dict(pyargs('Robert',357,'Mary',229,'Jack',391))
studentID = 

  Python dict with no properties.

    {'Mary': 229.0, 'Robert': 357.0, 'Jack': 391.0}