how to delete a digit from an array ???
Show older comments
Hello! everyone I have a program in which i have one array of binary numbers and a loop... i wana that if the condition in loop is true then one binary number must be deleted from array... , suppose {
A=[0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 ]
if ( A == 0 & F(i, j)==255)
"then delete 0 from array"
end}
which function should i use to delete a digit from array...plz help me. Thanks in advance
Accepted Answer
More Answers (1)
Sean de Wolski
on 5 Jul 2011
B = A(~A & F(i,j)~=255)
2 Comments
Oleg Komarov
on 5 Jul 2011
Sean keeps those which not match the deletion criteria = delete those which match criteria.
Sean de Wolski
on 5 Jul 2011
Glass half full :-)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!