Matlab keeps executing functions from the wrong file even though the current folder is set correctly. What's going on?
24 views (last 30 days)
I have two folders with similar Matlab scripts that have the same name. I often have to hop back and forth in these folders. I always set the current folder (Home > Set Path) to the folder I am accessing. However, whenever I run a script in that folder, sometimes the functions being called are functions belonging to the folder I last used. I know this because I get an error telling me its running the function file in the wrong folder (I can see the function arguments in the error message). Any suggestions? I am happy to share any code, but I do not think that is neccessary.