use global APPHOME instead of getenv('APPHOME')
APPHOME
points to the location of data files.
It is taken from the environment during startup, but may be modified during the Matlab session without affecting the environment.
APPHOME
points to the location of data files.
It is taken from the environment during startup, but may be modified during the Matlab session without affecting the environment.