gusucode.com > bigdata 工具箱 matlab源码程序 > bigdata/+matlab/+bigdata/+internal/+util/indexSlices.m
function data = indexSlices(data, indices) %indexSlices Helper function for performing indexing only in the first %dimension. % Copyright 2016 The MathWorks, Inc. sz = size(data); data = data(indices, :); if numel(sz) > 2 data = reshape(data, [size(data, 1), sz(2:end)]); end end