How to convert memory to Megabyte

20 次查看(过去 30 天)
Hello every one,
I use the matlab function memory () to calculate the memory cost of my matlab program the result is as follow:MemUsedMATLAB: 1.6919e+09
I have to many value like that I save them in Excel table so how can I convert these values to Mega byte.
Thank you

采纳的回答

dpb
dpb 2021-6-18
编辑:dpb 2021-6-18
>> m=memory;
>> sprintf('%.0f MB',m.MemUsedMATLAB/(1024^2))
ans =
'2305 MB'
>>

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

标签

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by