%% Smallest Elements of Matrix Rows
% Compute the smallest 3 elements of each row of a matrix.

A = magic(5)
B = mink(A,3,2)

% Copyright 2012 The MathWorks, Inc.