Apress / python-for-matlab-development

Source Code for 'Python for MATLAB Development' by Albert Danial
Other
37 stars 18 forks source link

ps.virtual_memory(); #1

Open AndreZeug opened 2 years ago

AndreZeug commented 2 years ago

Dear Albert, I enjoyed your presentation in MatlabExpo2022 quite a bit. Using Win10 & R2022a and comparing memory values obtaind by Python and Matlab by %% All executed in Matlab % Matlab sysMem = memory % Python ps = py.importlib.import_module('psutil'); mem = ps.virtual_memory()

can you please explain the differences between Python's double(mem.available) and Matlabs sysMem.MemAvailableAllArrays?

PS: sorry, I was not able to put the first block of code into a single block and using "newline"

AlDanial commented 2 years ago

hi, I work almost exclusively in Linux and so only rarely use (or have the opportunity to use) memory in MATLAB. The next time I'm on a Windows computer I'll give it a try and compare the results.