    function [Xout] = dsample(X, ms, ns)
%%  function [Xout] = dsample(X, ms, ns)
    %%
[m, n, panels] =size(X);
is = [1:ms:m];
js = [1:ns:n];
Xout = X(is, js, :);

