MATLAB: How to display the Index of a matrix to other corresponding matrices

indexing

Hi All,
Please can you help me solve this problem?
I have 3 different matrices
A=[8 3 5;2 4 6;9 3 4]
B=[4 11 5;9 3 2;4 8 1]
C=[11 40 3;10 7 5;11 3 60]
My mimimum value in matrix A=2 (i.e row 1 column 2). Now the question is how do i make the corresponding matrices of B & C to automatically display their values of row 1 and column 2 which is B=9, C=10?
Thank you

Best Answer

A = [8,3,5;2,4,6;9,3,4]
A = 3×3
8 3 5 2 4 6 9 3 4
B = [4,11,5;9,3,2;4,8,1]
B = 3×3
4 11 5 9 3 2 4 8 1
C = [11,40,3;10,7,5;11,3,60]
C = 3×3
11 40 3 10 7 5 11 3 60
[v,x] = min(A(:));
B(x)
ans = 9
C(x)
ans = 10
Or without reshaping A:
[v,x] = min(A,[],'all','linear');