本文介绍了MATLAB:如何查看.m文件使用了多少内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
正如标题所述,我们如何才能看到在MATLAB的.m文件(包括函数)上使用的内存?是否有命令或其他东西?我想将其用作算法中的指标.
As the title says, how can we see the memory that was used on a .m file(including functions) on MATLAB? Is there some command or something?I would like to use it as a metric in my algorithm.
谢谢
推荐答案
在命令行中执行
profile -memory on;
并正常启动Matlab探查器以查看内存使用情况.但是,您可能需要手动复制信息
and start the Matlab profiler as normal to see memory usage. However, you may need to copy information manually
可能有一些替代方法,例如mtic
和,具体取决于您的Matlab版本,这可能允许将数据直接馈送到非GUI输出.
There may be some alternatives, such as mtic
and mtoc
, depending on your Matlab version, which may allow feeding the data directly to a non-GUI output.
这篇关于MATLAB:如何查看.m文件使用了多少内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!