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]
0 个评论
采纳的回答
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 Center 和 File Exchange 中查找有关 Cell Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!