What mean ''All zero sparse''

Hello, I would like to obtain a row vector concerning a line in a matrix Ai :
for j = 1 : num_nodes_i
rowj = Ai(j, :);
end
When I tried to open rowj in my workspace I only can read :
val = All zero sparse: 1×84
What does this result mean? The rowj vector contains only zero values?

回答 (1 件)

dpb
dpb 2018 年 8 月 22 日
編集済み: dpb 2018 年 8 月 22 日

0 投票

Yes; pretty easy to just check and see...
>> A(3,3)=1;
>> S=sparse(A)
S =
(3,3) 1
>> S(1,:)
ans =
All zero sparse: 1×3
>> S(3,:)
ans =
(1,3) 1
>>

カテゴリ

ヘルプ センター および File ExchangeSparse Matrices についてさらに検索

製品

リリース

R2017b

質問済み:

2018 年 8 月 22 日

編集済み:

dpb
2018 年 8 月 22 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by