在MATLAB中从3个矩阵中获取坐标最大值(Get coordinate-wise maximum out of 3 matrices in MATLAB)
假设我有3个矩阵A , B , C 。 我想创建一个包含矩阵最大值的新矩阵。
例如,让
A = [ a11 a12.. ] B = [b11 b12 ..] C = [c11 c12 ..]
[ a21 a22.. ] [b21 b22 ..] [c21 c22 ..]
我希望以这种方式构造新矩阵
NewMatr = [max(a11,b11,c11) max(a12,b12,c12) .. ]
[max(a21,b21,c21) max(a22,b22,c22) .. ]
我想把它们组合成新的矩阵,它将包含3x1向量并将max应用于这个新矩阵,但我不知道如何。 Pf当然总是有方法,但我正在进行优化。
Suppose I have 3 matrices A, B ,C. I want to create new matrix which will contain maximum value of matrices.
For example let
A = [ a11 a12.. ] B = [b11 b12 ..] C = [c11 c12 ..]
[ a21 a22.. ] [b21 b22 ..] [c21 c22 ..]
I want new matrix be constructed this way
NewMatr = [max(a11,b11,c11) max(a12,b12,c12) .. ]
[max(a21,b21,c21) max(a22,b22,c22) .. ]
I thought of c