找回密码
 注册
Simdroid-非首页
查看: 147|回复: 10

矩阵溢出;matlab矩阵的最大容量是多少?

[复制链接]
发表于 2011-7-3 12:51:41 | 显示全部楼层 |阅读模式 来自 江西赣州
在定义矩阵的时候出现了out of memory。像a(n,n),这个n最大取多大如果要实现b=a\u,能实现分块运算么?怎么分?
发表于 2011-7-3 13:17:09 | 显示全部楼层 来自 广东广州
Simdroid开发平台
matlab矩阵的最大容量,与你电脑的内存有关,与Matlab本身无关

评分

1

查看全部评分

回复 不支持

使用道具 举报

 楼主| 发表于 2011-7-3 14:50:08 | 显示全部楼层 来自 江西赣州
:'( ,我已经尝试过修改虚拟内存了,现在我的矩阵定义只能定义到8000x8000,与我要求的差很远啊。
回复 不支持

使用道具 举报

发表于 2011-7-3 20:03:42 | 显示全部楼层 来自 四川成都
rockwoods老师的《matlab高效编程技巧与应用25个案例分析》这本书里有一张专门说如何处理海量数据的方法,可用的办法比较多,可以参考一下,但最好从硬件或者编程思路上解决这个问题。
回复 不支持

使用道具 举报

发表于 2011-7-3 21:47:16 | 显示全部楼层 来自 河北廊坊
我记得理想情况下单个变量最大只能是1g,你要根据自己的数据个数,你这个8000×8000好像是512m。
单个变量也受内存碎片的影响,clear或者重启一下matlab会有好处。
32位操作系统matlab能够利用的内存应该是2g多,你可以考虑将数据分块,分别来进行计算。

评分

1

查看全部评分

回复 不支持

使用道具 举报

 楼主| 发表于 2011-7-4 08:10:17 | 显示全部楼层 来自 江西赣州
5# feynmand
重启matlab我也是经常用的,我觉得还是应该从编程思路上想,才能有较大的收获。现在有个分行计算的想法,先试试。
回复 不支持

使用道具 举报

 楼主| 发表于 2011-7-4 08:11:14 | 显示全部楼层 来自 江西赣州
4# lengyunfeng
嗯,我也想从编程思路上下功夫会比较好。
回复 不支持

使用道具 举报

发表于 2011-7-4 11:26:11 | 显示全部楼层 来自 河北廊坊
32位Windows操作系统有3gb开关
Using the 3GB Switch on Windows Systems

Microsoft Windows XP systems can allocate 3 GB (instead of the default 2 GB) to processes, if you set an appropriate switch in the boot.ini file of the system. MathWorks recommends that you only do this with Windows XP SP2 systems or later. This gives an extra 1 GB of virtual memory to MATLAB, not contiguous with the rest of the memory. This enables you to store more data, but not larger arrays, as these are limited by contiguous space. This is mostly beneficial if you have enough RAM (e.g., 3 or 4 GB) to use it.

After setting the switch, confirm the new value of the virtual memory after restarting your computer and using the memory function.

[userview systemview] = memory;

systemview.VirtualAddressSpace
ans =
  Available: 1.6727e+009   % Virtual memory available to MATLAB.
      Total: 2.1474e+009   % Total virtual memory

For more documentation on this option, use the following URL:

http://support.microsoft.com/support/kb/articles/Q291/9/88.ASP

Similarly, on machines running Microsoft Windows Vista, you can achieve the same effect by using the command:

BCDEdit /set increaseuserva 3072

For more documentation on this option, use the following URL:

http://msdn2.microsoft.com/en-us/library/aa906211.aspx

评分

1

查看全部评分

回复 不支持

使用道具 举报

 楼主| 发表于 2011-7-4 16:44:13 | 显示全部楼层 来自 江西赣州
8# feynmand
:'(    Think you!
回复 不支持

使用道具 举报

发表于 2011-7-20 03:48:07 | 显示全部楼层 来自 辽宁大连
试试稀疏矩阵
回复 不支持

使用道具 举报

发表于 2011-7-20 10:14:39 | 显示全部楼层 来自 山东烟台
改为single试试
实在不行就分块好了
回复 不支持

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Simapps系列直播

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-10-6 10:33 , Processed in 0.047023 second(s), 15 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表