Another way to ask this question is: how do I create a value class object as the output of a handle class ordinary method? For example,
classdef handleClassA < handle properties end methods function obj = handleClassA(varargin) ... end function ValueClassobj2 = unknownmethod(handleClassAobj, ValueClassobj1) ValueClassobj2.property1 = ... some_sort_function(handleClassAobj.property3, ValueClassobj1.property1); ... end endend
If I do it the above way, the output is a struct with field property1, etc., not a object of a class.
Best Answer