I\'m trying to list classes I created in some folder in my Matlab folder - using only their name (class name)
as an example, I have a class called \'SimpleString\' -
Use a package to access class constructors with .()
-notation.
A Matlab package is simply a folder/directory with a name that begins with +
:
classdef foo
methods
function obj = foo(arg1, arg2)
%foo constructor
end
end
end
With class foo
defined this way, you can access the constructor of mypackage.foo
as
class_name = 'foo';
o = mypackage.(class_name)('arg1_value', 'arg2_value');