卸载矩阵并释放内存 [英] Unload matrix and free memory

查看:99
本文介绍了卸载矩阵并释放内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以从文本文件中加载矩阵:

I can load a matrix from text file:

load mydata.txt

问题是我的矩阵文件大约为250Mb,经过几次这样的加载,我没有内存可以处理下一个文件.

The problem is my matrix file is about 250Mb and after several such loads I have no memory to work with next files.

如何卸载它并释放资源以备将来使用?

How could unload it and free resources for further use?

推荐答案

使用清除 clearvars .默认情况下,MATLAB将根据您的语句创建一个名为mydata的变量,因此

Use clear, or clearvars. By default, MATLAB will create a variable called mydata as a result of your statement, so

clear mydata

这篇关于卸载矩阵并释放内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆