What is the propper way to create the equivalent of a dictionary object in Mathematica?
For instance, say roughly that the desired dictionary has the form
truckWheel =
{"name":"wheel", "mass":5.7, "Ix":20.0, "Iy":1., "Iz":17., "center of mass":{0.,0.,0.}}
where a key/data pair is indicated by a colon ( : ).
Then individual elements would be accessed by their keys
truck_wheel["name"] (* would return "wheel" *)
truck_wheel["mass"] (* would return 5.7 *)
and new elements are added by creating a new key:
truck_wheel['Ixy'] = 0.0
Association! – Szabolcs Mar 05 '17 at 12:31Association? Ok, thanks for the quick response! – Dimitris Mar 05 '17 at 12:33