MATLAB: How to use max function in cell arrays or structures

arraysmax

I have a cell arrays:
.
.
how do i apply the
max function
to get the maximum 7×2 matrix value across all 3 matrices?
Example
g{1,1} = 1 2 3
2 4 5
5 3 2
g{1,2} = 2 4 1
1 7 2
1 1 2
g{1,3} = 2 2 2
3 1 2
4 8 1
So i will bring the the highest matrix such that
A = 2 4 3
3 7 5
5 8 2

Best Answer

g{1,1} = [1 2 3
2 4 5
5 3 2]
g{1,2} =[ 2 4 1
1 7 2
1 1 2]
g{1,3} =[ 2 2 2
3 1 2
4 8 1]
result = max(cat(3, g{:}), [], 3)