how to delete a digit from an array ???
이전 댓글 표시
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
채택된 답변
추가 답변 (1개)
Sean de Wolski
2011년 7월 5일
B = A(~A & F(i,j)~=255)
댓글 수: 2
Oleg Komarov
2011년 7월 5일
Sean keeps those which not match the deletion criteria = delete those which match criteria.
Sean de Wolski
2011년 7월 5일
Glass half full :-)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!