举个例子看看:
有一个文本数据如下:
% 第一行内容视为列名称
T = readtable('csv_table.txt')
% 访问其中的内容
LastName = T.LastName
% 数据部分
data_part = table2array(T(:, 3:end))
拓展
% table 和 struct 互转
Tstruct = table2struct(T)
table_struct = struct2table(Tstruct)
% table 和 cell 互转
Tcell = table2cell(T)
% 需要设置列名称
cell_table = cell2table(Tcell, 'VariableNames', T.Properties.VariableNames)