calculate the minimum probability
Show older comments
I have in one case two matrices and in the other case three matrices of size 2922x1. the values within the matrices are probability values. how do i calculate the minimum probability between these 2 and between these 3 matrices?
2 Comments
Torsten
on 19 Jan 2022
What do you mean by "minimum probability between two matrices" ?
ELISABETTA BILLOTTA
on 19 Jan 2022
Accepted Answer
More Answers (1)
Assuming they are the same class and size, you can concatenate them and call min with a dimension input.
A = randi([-5, 5], 4)
B = randi([-5, 5], 4)
C = cat(3, A, B)
D1 = min(C, [], 3) % Min along the third dimension
The concatenation strategy can work with more than two arrays, but for this simple example of two arrays you can just call the binary form of min.
D2 = min(A, B)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!