Instantiate class from name in MATLAB
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' - and I'm aiming to instantiate an object from that class, if all I know is that its name is 'SimpleString' So in realtime, I'd like to find out what classes are in a folder (done), then be able to instantiate any of those classes (my question) Thanks You can use eval to instantiate the class using just the class name. instance = eval('SimpleString'); However, if you're simply iterating through all the m-files in a folder containing