MATLAB: Modified settings (PersonalValue) not persistent across sessions (display scaling)

displayfont sizeshigh-resolution screenlinuxMATLABsettings

I want to display Matlab on a high resolution 4K screen. I am using Matlab 2019b and my operating system is Linux Mint 18.3. With the default settings, the fonts and the icons are tiny, as described in question https://ch.mathworks.com/matlabcentral/answers/406956-does-matlab-support-high-dpi-screens-on-linux. I have changed the system settings of my OS (fonts and display scaling), which a lot of other programs obey, but Matlab does not.
I have tried to solve the issue using the answer
i.e.,
>> s = settings;s.matlab.desktop.DisplayScaleFactor
>> s.matlab.desktop.DisplayScaleFactor.PersonalValue = 1.5
However, the change to
s.matlab.desktop.DisplayScaleFactor.PersonalValue
does not persist across sessions: After restarting Matlab, PersonalValue 's value is undefined again.
I read in https://ch.mathworks.com/help/matlab/matlab_external/access-and-modify-settings.html that changes to PersonalValue are saved to the preferences folder, which in my case (according to prefdir) is ~/.matlab/R2019b. I have read and write access to this folder.
How can I change the DisplayScaleFactor permanently? Why are the settings not saved?
(Similarly, changing the Matlab font sizes in Preferences -> Fonts is not persistent for the Desktop code font; however for the Desktop text font, it is.)

Best Answer

Thank you @Harsha Priya Daggubati!
Renaming my preference directory to R2019b_old, as suggested in the link that you provided, and letting Matlab create a fresh one solved the problem! Now my preferences are saved across sessions and the display scaling works.
Related Question