hi!! I am at the end of my project, please help me.
1 次查看(过去 30 天)
显示 更早的评论
I have two rows ft=[0 0 -1 0 -1 -1] and st=[0 0 -1 0 0 -1] I want the position of equal elements i.e for 0 when comparing both the rows, I want position as 1 2 4 as my answer.
ft=[0 0 -1 0 -1 -1]
st=[0 0 -1 0 0 -1]
pos= 1 2 4 (expected answer).
I am trying to use
pos=find(bitand(ft,st)==0);
but getting this error
Double inputs must have integer values in the range of ASSUMEDTYPE.
I know this error is because of '-1'. Is there any other way to find the position.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!