フィルターのクリア

How can I trim a dataset with missing values

1 回表示 (過去 30 日間)
Sebastian
Sebastian 2016 年 11 月 3 日
コメント済み: abduall hassn 2016 年 11 月 3 日
I have a dataset I'm working on as part of a project. I need to trim it down for some specific information, but I can't figure out how to go about it, as it's too much data to manually manipulate.
Essentially I have 2 columns with information. The first column holds a date and time in various formats. I need each cell to be the time only.
example:
05/07 2008 13:40 --> 13:40 --> 13.40
11.01.2009 15.12 --> 15.12
Is there a way to do this in matlab? (I was thinking regex but I'm not very experienced in that)
The second column simply holds either a 1 or a 0. The problem here is that I need both columns for each row, or I have to discard the data. Is there a way to automatically delete rows, for which there's less than 2 columns of data?
Thanks in advance.
  2 件のコメント
Guillaume
Guillaume 2016 年 11 月 3 日
Yes, you could use a regular expression to extract your time, but for us to tell you which expression to use we would need to know what are all the possible formats we have to deal with.
As for your second question, the answer again is yes, but to answer it properly we need to know what form your data is in at the moment. How can there be less than two columns of data for some rows if everything is stored in a cell array?
abduall hassn
abduall hassn 2016 年 11 月 3 日

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by