Switching between functions that have the same name
Show older comments
Hi,
I have 30 folders, each one containing a different version of a class named 'myClass.m'.
I would like to call these different versions sequentially from a main script.
In the script, I loop 30 times, every time changing the path like this :
for i=1:30
restoredefaultpath ;
addpath(versionPath);
% work with this version of the class %
end
But this seems not to work. Every time I change the path, Matlab seems to "remember" the previous version of the class.
Is there any way to make this in a cleaner way ?
Thank you in advance !
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!