What are ‘X and Y axis’?
AXY = A.*X.*Y.*A;
Xint = trapz(AXY,1); % Integrate Columns (Dimension 1)
Yint = trapz(AXY,2); % Integrate Rows (Dimension 2)
Xintsq = squeeze(Xint)
Yintsq = squeeze(Yint)
This gives ‘Xint’ as a (1x10x15) matrix and ‘Yint’ as a (10x1x15) matrix. After the squeeze calls, they are both (10x15) matrices.
Alternatively, do successive integrations:
XYint = trapz(Xint);
producing a (1x15) vector.
Experiment with this approach to get the result you want (since I have absolutely no idea what that is).
.