How to get multiple class instances in function?
古いコメントを表示
I wanna get two object instance at once in my function like this
classdef MyClass
properties
value
end
methods
function tmp=myfunc(obj1, obj2)
tmp=obj1.value+obj2.value
end
end
end
and in console
a=myclass;
b=myclass;
a.myfunc(a,b);
and error occurs.
it says too many arguments
How to get multiple class instance at once?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Construct and Work with Object Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!