| 查看: 256 | 回复: 2 | |||
| 当前主题已经存档。 | |||
| 【有奖交流】积极回复本帖子,参与交流,就有机会分得作者 tangtangtoy 的 1 个金币 | |||
tangtangtoy木虫 (小有名气)
|
[交流]
【求助】nzmax是对稀疏矩阵的内存扩充,如何人为修改?
|
||
|
nzmax总是对稀疏矩阵分配过大的空间,但在矩阵计算过程中,由于元素的增减,nzmax自动分配的空间过大。如: k=sparse(eye(8000)) k(:,3)=9 则此时 nzmax为 48000 |
» 猜你喜欢
282求调剂
已经有22人回复
283求调剂
已经有5人回复
265求调剂
已经有21人回复
288求调剂 一志愿哈工大 材料与化工
已经有10人回复
调剂0855-288
已经有5人回复
电子信息调剂交叉学科有推荐吗
已经有6人回复
266求调剂
已经有6人回复
材料科学与工程考研
已经有10人回复
283分材料与化工求调剂
已经有29人回复
一志愿哈尔滨工业大学085600英一数二337分求调剂
已经有4人回复

hitzhang
木虫 (正式写手)
- 仿真EPI: 1
- 应助: 0 (幼儿园)
- 贵宾: 2.15
- 金币: 1376.7
- 散金: 969
- 红花: 8
- 帖子: 862
- 在线: 226.4小时
- 虫号: 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

3楼2009-09-02 20:43:28














回复此楼