Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

problem with code - deleting rows and columns from matrix

Status
Not open for further replies.

majida

Newbie level 2
Joined
Aug 18, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,295
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
 

Aya2002

Advanced Member level 4
Joined
Dec 12, 2006
Messages
1,142
Helped
184
Reputation
376
Reaction score
118
Trophy points
1,343
Location
Iraq
Activity points
8,019
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?
 

majida

Newbie level 2
Joined
Aug 18, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,295
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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top