compare elements in rows of a matrix
8 次查看(过去 30 天)
显示 更早的评论
Hi,
I have the following matrix:
a=[1 2 3 9; 2 2 3 1; 3 3 3 3]
is there a function that compares the elements of every row?
Something that tells me if they are all different or all the same.
I would like to get
out=[1 0 0]
or
out=[0 0 1]
thanks,
michele
0 个评论
采纳的回答
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!