Starting in R2014b there is a MATLAB preference for doing this. Open the Preferences dialog from the Home tab in MATLAB and select MATLAB/General preferences tree node on the left side of the dialog. The General preference panel has an option to select the "Initial working folder".
I'm using Matlab 2017b on windows 10. its startup folder is C:\Program Files\MATLAB\R2017b\bin. I want to change it but I have not succeeded yet!!! I tried it with using preference settings and userpath() command but this folder is not changed!!! Please someone help me!