Hi,
I can see you are passing into ‘mesh’ data with different sizes, this would cause ‘Data dimensions must agree’ error.
The errors occur because of extra character in the m1=sum(L1(1:2160,:,')); statement. While calculating m1 using L1, the correct way of indexing would be,
m1=sum(L1(1:2160,:,:));