string extraction from txt file

2 次查看(过去 30 天)
Pas182
Pas182 2022-5-20
评论: Pas182 2022-5-20
Hi Matlab community!
I have a txt file which cointains n #rows and i want to extract the strings for each row with a for Cycle.
Importing the txt i have a textdata string like:
so i'd like to extract, starting from row #2, the contents in column 2 for each row (in this case there's just 1 row i'm interested to).
Which is the best way to do it?
Many Many thanks to everyone!!

回答(1 个)

Prabakar kg
Prabakar kg 2022-5-20
Please check readtable. This can help you read the data from txt and spreadsheet files as MATLAB table. Hope this helps!
  1 个评论
Pas182
Pas182 2022-5-20
it helps but i need to develop a "for" cycle in order to get the value in column 2 for each row. That is the hard part :(

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by