How to convert memory to Megabyte

27 vues (au cours des 30 derniers jours)
Mira le
Mira le le 18 Juin 2021
Modifié(e) : dpb le 18 Juin 2021
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

Réponse acceptée

dpb
dpb le 18 Juin 2021
Modifié(e) : dpb le 18 Juin 2021
>> m=memory;
>> sprintf('%.0f MB',m.MemUsedMATLAB/(1024^2))
ans =
'2305 MB'
>>

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Tags

Produits


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by