フィルターのクリア

Separate data into matrices and plot

1 回表示 (過去 30 日間)
Melvin
Melvin 2013 年 6 月 4 日
Good afternoon,
I am working with .txt files that contain multiple "receivers" of data, that is, multiple sets of data coming from the same specimen. I would like to separate these receivers into different matrices, and plot each matrix. Each matrix is [rx2], and the receivers are separated by a row that specifies the beginning of the next receiver. I am able to read the text file but my code cannot differentiate between strings and numbers. How can I separate my data?
  2 件のコメント
Kye Taylor
Kye Taylor 2013 年 6 月 4 日
What function are you using to read the data in? Can you provide us the command and the size and type (or class) of the output?
Jonathan Sullivan
Jonathan Sullivan 2013 年 6 月 4 日
Post a sample of your .txt file.

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

回答 (1 件)

Julius
Julius 2013 年 6 月 10 日
I recommend using "readtext" function from File Exchange (<http://www.mathworks.com/matlabcentral/fileexchange/10946-readtext)>.
Using this command to call "readtext":
the_data = readtext('sample.txt');
Then the_data is a n-by-1 cell array, where n is the total number of rows in your TXT file, including the blank row. The blank row becomes an empty cell element in the cell array. Identify those empty cell elements and you can separate data from different receivers.

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by