>> I wouldn't use this approach; I'd instead select the elements to keep.>> It avoids the IF and ELSEIF statements at the expense of a call to MIN:>>>> minRows = min(x, y);>> a = a(1:minRows, :);>> b = b(1:minRows, :);>>> ...>> It then also has the cost of the selection on both where one is already> ok that the if...elseif avoids which is why I went that route....