How can I rebuild the Table as a 5x1 structured array with "struct" Code ??

1 次查看(过去 30 天)
Table = {'GasName','GasSymb','a','b';[ 'Helium', 'Hydrogen', 'Oxygen', 'Chlorine','CarbonDioxide']',[ 'He', 'H2', 'O2', 'Cl2','CO2']',[0.0341,0.244,1.36,6.49,3.59]',[0.0237,0.0266,0.0318,0.052,0.0427]'}
Table =
'GasName' 'GasSymb' 'a' 'b'
[41x1 char] [12x1 char] [5x1 double] [5x1 double]

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-9-27
data1=['Helium','Hydrogen','Oxygen','Chlorine','CarbonDioxide']';
data2=[ 'He', 'H2', 'O2', 'Cl2','CO2']';
data3=[0.0341,0.244,1.36,6.49,3.59]';
data4=[0.0237,0.0266,0.0318,0.052,0.0427]';
table=struct('GasName',data1,'GasSymb',data2,'a',data3,'b',data4)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Cell Arrays 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by