www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/ConvertTableofNumericDatatoArrayExample.m

    %% Convert Table of Numeric Data to Array  
% Create a table, |T|, consisting of numeric data. 
T = table([1;2;3],[2 8; 4 10; 6 12],[3 12 21; 6 15 24; 9 18 27],...
    'VariableNames',{'One' 'Two' 'Three'})  

%% 
% Convert table, |T|, to an array. 
A = table2array(T) 

%%
% |A| contains two columns from variable |Two| and three columns from variable
% |Three|.