Accessing ordinary functions within objects
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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!
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!