Set all elements of a sparse matrix to zero
2 ビュー (過去 30 日間)
古いコメントを表示
I have 4 sparse matrices A, B, C, and D .
ABCD = [A B; C D];
How can I set the all elements of the sparse matrix B and C to zeros?
3 件のコメント
James Tursa
2020 年 9 月 17 日
Do you mean you have ABCD and want to 0 out the parts originally associated with the B and C spots? Or do you mean you have A and D and want to built ABCD with effectively 0 for the B and C spots?
Bruno Luong
2020 年 9 月 17 日
編集済み: Bruno Luong
2020 年 9 月 17 日
Strictly speaking, your question is trivial to answer!
B(:) = 0;
C(:) = 0;
I challenge you to tell me why this doesn't answer your question.
Just to show how your question is in fact ill-formulated.