Accessing ordinary functions within objects

1 view (last 30 days)
qwert
qwert on 24 Aug 2015
Edited: qwert on 24 Aug 2015
Hi,
I'm using the @folder convention for creating classes. To reuse code which was not object oriented, I simply create a private folder and copy the old files into this folder. This way it is possible to call the functions within this class as a regular function, i.e. without the "obj" (function(var1,var2) instead of obj.function(var1,var2)) and the old code does not have to be changed at all. Unfortunately, this only works within the private folder. If the function files lie in the @folder, matlab cannot find the function. My problem is that I have some code, which is devided into subfolders and I would like to copy all theses files with subfolders into the private folder. I could copy all files into the private folder without subdirecties, but I would like to keep the folder structure. I would also like to know, if there is anouther way to use theses functions as ordinary functions, without the private folder, thus not declaring them private.
Thank you for your help!

Answers (0)

Categories

Find more on Software Development Tools in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!