I tried to locate pathdef.m to notebook root or userpath of matlab but that doesn't affect to change path of the matlab kernel. How can I automatically add custom path to a matlab kernel when the kernel starts?