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!