majida
Newbie level 2

problem with code
hi,
i m facing problem with code, actually
if have a matrix of any dimension , i have any whole row and whole column zero in a matrix and want to delete this row n column from this matrix but im unable to understand how to delete this row n column i.e. i should get the matrix with reduced dimension
b is a matrix of "n" dimensions
and supppose its 2nd row n 2nd column is zero i want to delete this whole row and column
for i=1:n
for j=1:n
if find(b(i,j)~=0)
table(i,j)=b(i,j);
else
continue
end
end
end
thanks
hi,
i m facing problem with code, actually
if have a matrix of any dimension , i have any whole row and whole column zero in a matrix and want to delete this row n column from this matrix but im unable to understand how to delete this row n column i.e. i should get the matrix with reduced dimension
b is a matrix of "n" dimensions
and supppose its 2nd row n 2nd column is zero i want to delete this whole row and column
for i=1:n
for j=1:n
if find(b(i,j)~=0)
table(i,j)=b(i,j);
else
continue
end
end
end
thanks