pyargs() not working in python interface

7 views (last 30 days)
Matthew Parry
Matthew Parry on 1 Dec 2021
When I try to use the inkstone package ( with MATLAB the pyargs() function doesn't work properly.
>>> pip install inkstone
In MATLAB I have
s = py.inkstone.Inkstone();
which gives the error
Unrecognized method, property, or field 'AddMaterial' for class 'py.inkstone.simulator.Inkstone'.
I can get around this one by using
s.AddMaterial('di', pyargs('epsilon',12))
But then I get an error with
s.AddLayer('in', pyargs('thickness',0, 'material_background','vacuum'))
Unrecognized method, property, or field 'AddLayer' for class 'py.inkstone.simulator.Inkstone'.
From this point on pyargs() simply won't work and I have to list every argument in the order in which they are defined in the method. This ofcourse makes it impossible to use a method where I don't want to specify a particular argument.
If I use pyargs() at the command line I get
ans =
pyargs with no properties.

Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!