How to extract data from cell array
显示 更早的评论
Hellow,
I´m a aerospace Engineer,
I´ve this 4x1 cell array read from a text file by "fgetl" function. This code contains information about two nodes (B10 and D22) of a thermal FEM:
%%%%%%
B10 = 'cryos', T = T_caja_top,
A = 0.916088, ALP = 1.000000, EPS = 0.850000,
FX = -0.270000, FY = 0.000000, FZ = 0.000000;
D22 = 'Heater wire 1', T = T_INI, QI = PJoule;
%%%%%%
So, I would like to extrat all the information and create a tipe "structure" variable called "Nodes". Example:
Node B10, Atributes: Name:'cryos', Temperature = T_caja_top, Area = 0,916088...
Node D22, Atributes: Name: 'Heater wire 1', Temperature = T_INI....
Any help is really welcome.
Regard, the delimiter between nodes is: ';'
Thank you so much,
Pelayo Vázquez Rodríguez
2 个评论
Sindar
2020-5-13
check out cell2struct: https://www.mathworks.com/help/matlab/ref/cell2struct.html
Pelayo Vázquez Rodríguez
2020-5-13
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Cell Arrays 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!