problem with code - deleting rows and columns from matrix

1. 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

•

2. problem with code

I can not understand you. Your program say that any value not equal to zero will be copied to table(i,j), what do you need exactly?

•

3. Re: problem with code - deleting rows and columns from matri

i,ve solved the problem sorry i couldnt explain it well i had to delete entire row n column frm a matrix i just equate that particular row n colum to [] and got the required result

--[[ ]]--