Accessing the perference using matlab script
32 views (last 30 days)
Show older comments
Mayuresh
on 26 Jun 2024 at 9:33
Answered: Matlab Pro
on 26 Jun 2024 at 14:07
I want to get the Current value that is set for 'MATLAB General Java Heap Memory Preferences' from the Preferences >> General >> MATLAB General Java Heap Memory Preferences tab. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1722936/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1722936/image.png)
0 Comments
Accepted Answer
Matlab Pro
on 26 Jun 2024 at 14:07
HI @Mayuresh
The next code line will do the works..
prefFile = fullfile(prefdir,'matlab.prf');
txt = fileread(prefFile);
re = regexp(txt,'JavaMemHeapMax=I(?<heapSize>\d+)','names');
heapSize = eval(re.heapSize);
0 Comments
More Answers (0)
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!