I have a very large n x n matrix from which I want to take a row i from and substitute every element with 0. When I try the below command however, the ith row is not replaced by a list of n zeros but a single zero, which breaks the matrix.
ReplacePart[A, {i -> {0}}]
Is there a neat way of substituting that {0} with some command that produces an automatic list of (length[A]) number of 0s?
A[[4,All]]*=0
$\endgroup$Dot
, e.g.DiagonalMatrix[1 - UnitVector[Length[A], i]].A
$\endgroup$