Accessing the perference using matlab script

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.

 採用された回答

Matlab Pro
Matlab Pro 2024 年 6 月 26 日

1 投票

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 件)

カテゴリ

ヘルプ センター および File ExchangeCall Java from MATLAB についてさらに検索

製品

リリース

R2022a

質問済み:

2024 年 6 月 26 日

回答済み:

2024 年 6 月 26 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by