From your question I understand that you want to club your matrices into one and then run the mean on it to get the monthly average. You can simply create a table from the two matrices and use the groupsummary function on that table in MATLAB to group the data on the basis of months and get the mean.
I have tried implementing the same on the given data. I have a datetime array "st" and have created an array "measure" containing same number of values as in st.
measure = [1; 2; 3; 4; 5; 6; 7; 8; 9; 1]
t = datetime(st,'InputFormat','yyyy-MM-dd HH:mm:ss')
data = table(t, measure)
groupsummary(data, 't', 'month', 'mean', 'measure')
This returns the result as:
month_t GroupCount mean_vec1
________ __________ _________
Nov-1995 2 1.5
Dec-1995 4 4.5
Jan-1996 3 8
Nov-1996 1 1
Here I have put the bin as "month" and the function to be applied on measure as "mean".
You can try something on the similar lines with your dataset in groupsummary function.
The groupsummary documentation has all the details about the groupbins. Feel free to leverage the same.
Hope it helps!