非零的矩陣元素
Syntax
s = nonzeros(A)
Description
s = nonzeros(A) 回傳一完整的行向量其存放在矩陣 A 中的非零元素,依行的順序排列。
A
給定 s,滿足 [i,j,s] = find(A),則
s
[i,j,s] = find(A)
length(s) = nnz(A) nzmax(A) prod(size(A))
length(s) = nnz(A)
nzmax(A)
prod(size(A))
See Also
find, isa, nnz, nzmax, size, whos
find
isa
nnz
nzmax
size
whos