11 lines
330 B
Matlab
11 lines
330 B
Matlab
function [v, idx] = mink (x, k, varargin)
|
|
%MINK The k smallest elements, in ascending order (MATLAB R2017b+).
|
|
%
|
|
% An owuitools compatibility shim; see contains.m for the policy.
|
|
|
|
if (nargin < 2)
|
|
error ('mink: not enough input arguments');
|
|
end
|
|
[v, idx] = owuitools_topk (x, k, 'ascend', 'mink', varargin{:});
|
|
end
|