| 查看: 303 | 回复: 2 | |||
| 当前主题已经存档。 | |||
| 【有奖交流】积极回复本帖子,参与交流,就有机会分得作者 tangtangtoy 的 1 个金币 | |||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | |||
tangtangtoy木虫 (小有名气)
|
[交流]
【求助】nzmax是对稀疏矩阵的内存扩充,如何人为修改?
|
||
|
nzmax总是对稀疏矩阵分配过大的空间,但在矩阵计算过程中,由于元素的增减,nzmax自动分配的空间过大。如: k=sparse(eye(8000)) k(:,3)=9 则此时 nzmax为 48000 |
» 猜你喜欢
filecode
已经有3人回复
我的国基提前知道中了,可是同事的操作让我实在接受不了,怎么会有这样的人
已经有10人回复
静等基金结果
已经有13人回复
关于Filecode分析方法
已经有3人回复
国自然结果
已经有8人回复
FileCode能看出啥?
已经有8人回复
应该是93bebmhtak前后十一个字符比较关键
已经有22人回复
奇怪,两个人的filecode固定段从头到尾一模一样
已经有4人回复
8月时间戳变的,举个手。玩一下,释放压力
已经有13人回复
好奇怪的filecode
已经有5人回复


3楼2009-09-02 20:43:28
hitzhang
木虫 (正式写手)
- 仿真EPI: 1
- 应助: 0 (幼儿园)
- 贵宾: 2.15
- 金币: 1356.7
- 散金: 969
- 红花: 8
- 帖子: 863
- 在线: 226.5小时
- 虫号: 390575
- 注册: 2007-06-02
- 性别: GG
- 专业: 无机非金属类电介质与电解
★
tangtangtoy(金币+1,VIP+0):谢谢指教,不过我的意思是动态扩充,系统默认是原来大小的5倍,太大了点 9-3 07:59
tangtangtoy(金币+1,VIP+0):谢谢指教,不过我的意思是动态扩充,系统默认是原来大小的5倍,太大了点 9-3 07:59
|
spalloc Allocate space for sparse matrix Syntax S = spalloc(m,n,nzmax) Description S = spalloc(m,n,nzmax) creates an all zero sparse matrix S of size m-by-n with room to hold nzmax nonzeros. The matrix can then be generated column by column without requiring repeated storage allocation as the number of nonzeros grows. spalloc(m,n,nzmax) is shorthand for sparse([],[],[],m,n,nzmax) Examples To generate efficiently a sparse matrix that has an average of at most three nonzero elements per column S = spalloc(n,n,3*n); for j = 1:n S(:,j) = [zeros(n-3,1)' round(rand(3,1))']';end |
2楼2009-09-02 11:58:34










回复此楼