このクラスのオブジェクトを他の関数と同じように呼び出すことができるようにMATLABクラスを定義することは可能ですか?
IOW、次のPythonクラスのようなものに相当するものをMATLABで記述できるかどうかを尋ねています。
# define the class FxnClass
class FxnClass(object):
def __init__(self, template):
self.template = template
def __call__(self, x, y, z):
print self.template % locals()
# create an instance of FxnClass
f = FxnClass('x is %(x)r; y is %(y)r; z is %(z)r')
# call the instance of FxnClass
f(3, 'two', False)
...
[OUTPUT]
x is 3; y is 'two'; z is False
ありがとう!