필터 지우기
필터 지우기

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?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by