MatSetValues(A,i,m,j,n,value,INSERT_VALUES,ierr)函数的作用是在大矩阵的(m,n)处插入一个i*j大小的矩阵。
A- the matrix
value- a logically two-dimensional array of values
i,m- the number of rows and their global indices
j, n- the number of columns and their global indices
其中,行和列矩阵索引是从0开始。
A
value
在A的(2,3)处插入value,于是A变成了: