function 3dexpand

Replaces all values in the single images of a datacube by the average in the respective images.

Syntax
result = 3dexpand(X)

Arguments
X:   A matrix.