clear; clc;

stocks = {'TSMC', 100;
          'AAPL', 200;
          'GOOG', 150};
[prices, idx] = sort([stocks{:, 2}])
stocks = stocks(idx, :)