How to use "OR" in find function?

5 次查看(过去 30 天)
This function get out the value of zeros
filter = find(x~=0)
now to write "or y>=0" in this function ?
ex:
filter = find(x~=0 or y>=0)

回答(1 个)

Walter Roberson
Walter Roberson 2020-5-17
filter = find(x~=0 | y>=0)
You could also use
filter = find( or(x~=0, y>=0) )

类别

Help CenterFile Exchange 中查找有关 Signal Generation and Preprocessing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by