clear; clc;

stocks = {"AAPL", [], "TSMC"};
isempty(stocks)
mask = cellfun(@isempty, stocks)
stocks = stocks(~mask)