check 2 same numbers in a matrix
2 次查看(过去 30 天)
显示 更早的评论
Hello everyone! :)
in a matrix like:
NaDFIR_from_tool = [ 80 39 101 39 101 175 237 172 232 168 232 168 104 40 ]
how can i check that a number (in this case 39 and 168) is present 2 times?
Thank you so much!
采纳的回答
Dyuman Joshi
2022-6-14
y= [80 39 101 39 101 175 237 172 232 168 232 168 104 40]
nnz(y==39)==2
nnz(y==168)==2
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!