MATLAB: How can i replace a matrix number with 0 replace matrix zero A=[-1,1,1;0,-1,0;0,0,-1;1,0,0]; I chose A(1,3) and A(3,3) which is including 1 and -1 And how can i replace them zero Best Answer A(1,3) = 0; A(3,3) = 0; Related SolutionsMATLAB: How can i replace a number with its no of ocurrences a=[1 0 1 0 1;0 1 1 1 1;1 1 0 1 1;1 1 1 1 1];cumsum(a,2).*aans = 1 0 2 0 3 0 1 2 3 4 1 2 0 3 4 1 2 3 4 5 MATLAB: How can i find column refer to row negcolumn = find(A(ThisRow,:) == -1);onerow = find(A(:,negcolumn) == 1);A(onerow, negcolumn) %crosscheck Related QuestionReduce the number of zeros in an arrayFind a row with -1Removing Zeros from the Beginning of a MatrixTic Tac Toe Simulator – Searching a 3-D matrix for cases where 2-dimensions are identicalHow can i find a special rowGet result from uitable’s row number
Best Answer