Switching between functions that have the same name
이전 댓글 표시
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 !
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!