How to compare 2 matrix ?
1 次查看(过去 30 天)
显示 更早的评论
I want to compare 2 matrix like this. for example first matrix I have 20 data and second matrix I have 100 data. can anyone help me ?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/168858/image.png)
8 个评论
Adam
2017-10-27
You just keep repeating the same phrases though. If you want help you have to give details that allow people to help you. Just keep saying 'compare' is meaningless.
If you just want to find the minimum value across two different vectors then this is easy, but that isn't what I thought you wanted originally.
a = rand(20,1);
b = rand(100,1);
smallestVal = min( [a; b] )
will achieve that.
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!