I want to read data and variable name from txt file
1 次查看(过去 30 天)
显示 更早的评论
The text file looks something like this and I want to create two coloumn one for value other for variable
DIM
CAP PF
FREQ MHz
IND NH
RES OHM
VAR
Lser = 0.4
Lser_Tx = 0.5
Qc =50
Ql = 50
Cshu= 1
0 个评论
采纳的回答
Voss
2022-6-16
For a text file that looks like that, readtable does essentially the right thing:
T = readtable('input_file_test.txt');
T.Properties.VariableNames = {'Variable','Value'}
9 个评论
Voss
2022-6-16
Most functions have a "See Also" section at the end of their documentation page, which contains links to other related functions that may be useful:
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Export 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!