From: Brandon T on
In updating/deploying an older program, I have come across this statement:

switch unit.color
case {4,5}
addpath(genpath('mfiles\blue')); %loads blue
case 6
addpath(genpath('mfiles\green')); %loads green
otherwise
addpath(genpath('libraries\red')); %loads red
end

'mfiles\blue', 'mfiles\green', and 'mfiles\red' all contain scripts,functions, and binary data for operations specific to each color of the unit. Obviously 'if ~isdeployed' is not an option considering the contents of each folder. Is there another possibility to maintain the file structure as well as the conditional?