채택된 답변

Matt J
Matt J 2015년 2월 26일
편집: Matt J 2015년 2월 26일

2 개 추천

The ~ operator
>> A=[1 0 2 3 0 0 4]
A =
1 0 2 3 0 0 4
>> nonzeroMap=~A
nonzeroMap =
0 1 0 0 1 1 0

댓글 수: 1

Or the not() command
>> nonzeroMap=not(A)
nonzeroMap =
0 1 0 0 1 1 0

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Constants and Test Matrices에 대해 자세히 알아보기

제품

태그

질문:

2015년 2월 26일

댓글:

2015년 2월 26일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by