clear; clc;

stocks = {'TSMC', 18;
          'AAPL', 25;
          'GOOG', 10};

[prices, idx] = sort([stocks{:, 2}], 'descend')
stocks(idx, :)