Function similar to isnan for zeros

160 次查看(过去 30 天)
Is there a function that does what isnan does but with zeros?

采纳的回答

Matt J
Matt J 2015-2-26
编辑:Matt J 2015-2-26
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Identification 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by