reading a data from a text file

Hello, what whould be an effecient way of reading a data file that is sturctured as columns and rows that will later allow me to seperate and break up the rows into smaller components or parts , be able to give each component a unique name and later on to extract each component easily.
for example I have this data file attached, the seperation process is baisclly by rows (ex: from raw 1 to row 70 .. from 71 to 140..) I have seen many many ways that a data file can be read using them but I am not sure which one is the best for my purpose, eventually after breaking up these rows I want to be able to give each part a unique name. Is there an effecient way in matlab for such purpose?

3 件のコメント

Adam Danz
Adam Danz 2021 年 9 月 15 日
I would use readtable to read in the data. I would not break up the table but use row indexing instead. If you must break up the table, I would store the sub-tables in a cell array rather than using dynamic variable naming which is what you're describing (reasons not use dynamic variable naming).
MA
MA 2021 年 9 月 16 日
thank you that was helpul
Adam Danz
Adam Danz 2021 年 9 月 16 日
I'm happy to chip in.

サインインしてコメントする。

 採用された回答

Jeevan Kumar Bodaballa
Jeevan Kumar Bodaballa 2021 年 9 月 16 日

1 投票

There are many ways to do that !
you can import data as coloumns with matlab user interface option. Then you can able slice according to your need

1 件のコメント

MA
MA 2021 年 9 月 18 日
thank you I will try that out as well ..

サインインしてコメントする。

その他の回答 (0 件)

製品

リリース

R2021a

質問済み:

MA
2021 年 9 月 15 日

コメント済み:

MA
2021 年 9 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by