cosmo dataset slice sa hdrΒΆ

function ds=cosmo_dataset_slice_sa(ds, to_select)
% Slice a dataset by samples (rows) [deprecated]
%
% sliced_ds=cosmo_dataset_slice_sa(ds, to_select)
%
% Input:
%   ds          a dataset struct with fields .samples (MxN for M samples
%               and N features), and optionally
%               sample attributes in ds.fa, each Nx>)
%   to_select:  Either a boolean mask, or a vector with indices, indicating
%               which samples to select in ds
%
% Returns:
%   sliced_ds   a dataset struct with the same fields as the input, but
%               with the selected samples in .samples (PxN, if to_select
%               selected O values) and the selected features in ds.sa
%
%
% Note:
%   - This function was, in 2013, intended as an exercise.
%   - This function is deprecated and will be removed in the future;
%     it is strongly recommended to use:
%           comso_slice(dataset, to_select, 1).
%
% #   For CoSMoMVPA's copyright information and license terms,   #
% #   see the COPYING file distributed with CoSMoMVPA.           #