Using Python, I want to write a Matlab struct to disk. This is fairly simple using scipy.io module: http://docs.scipy.org/doc/scipy-0.9.0/reference/tutorial/io.html
However, I want one of the fields of the struct to be a function of the form @sqrt so that when I load the .mat file to disk in matlab, I get this functionality:
>> myStruct = load('MyStruct.mat')
>> myStruct.myFunction(5)
ans =
2.2361
But I can't find how to do this. Simply putting in the string of '@sqrt' into one of the struct fields doesn't work.
thanks!