MATLAB: Find a maximum matrix of three matrices

excel

I have three matrices. A=[8,1,6;3,5,7;4,9,2], B=[6,7,2;7,4,8;1,2,3], C=[4,8,5;3,2,1;1,1,1], . I want to find the maximum of A,B and C matrices. answer should be [8,8,6;7,5,8;4,9,3]. I used max(A,B,C) Command.but it is not working.Can any one help me.

Best Answer

D = max(max(A,B),C)
Best wishes
Torsten.
Related Question