Hi all
I have a wrong program step. I don't know what is wrong with my program script.
I have data per 10 minutes which is divided into 7 columns, time and data.
09/10/2014 3:00 0
09/10/2014 3:10 0
09/10/2014 3:30 0.4
09/10/2014 3:50 0.4
09/10/2014 4:00 0.4
09/10/2014 4:10 0.4
09/10/2014 4:20 0.4
09/10/2014 4:30 0.4
10/10/2014 4:40 0.4
09/10/2014 4:50 0.4
09/10/2014 5:00 0.4
09/10/2014 5:10 0.4
09/10/2014 5:20 0.4
It can be seen that at 3:20 a.m. and the value of the data is empty, I want to get data per 10 minutes with empty data filled with 0 / nan.
I use matlab 2014b. there is no retime function so I have trouble ... I have asked before in this forum but have not received suggestions that are in accordance with this program. I attach the following data. I say thank you to anyone who has tried to help and advise ...
jan risn

댓글 수: 4

Mario Chiappelli
Mario Chiappelli 2019년 7월 18일
How are you collecting data? Is it through internal code or through ThingSpeak? Can I see the code you are using.
Adam Danz
Adam Danz 2019년 7월 18일
편집: Adam Danz 2019년 7월 18일
The attached data do not match the example you provided in your question. Are we tp assume the columns in your data are [year, month, day, hour, minute, fraction-of-minute]?
>> sample(1:5,:)
ans =
2014 8 10 8 20 0 0
2014 8 10 8 30 0 0
2014 8 10 8 40 0 0
2014 8 10 8 50 0 0
2014 8 10 9 0 0 0
What's column 1? At the end of the matrix there are weird year numbes.
>> sample(end-6:end,:)
ans =
37 6 5 22 50 0 0.4
37 6 5 23 0 0 0.4
37 6 5 23 10 0 0.4
37 6 5 23 20 0 0.4
37 6 5 23 30 0 0.4
37 6 5 23 40 0 0.4
37 6 5 23 50 0 0.4
Row #95 doesn't have a day value
>> sample(95,:)
ans = %v
2014 9 10 0 0 0 0
The data needs a bit more explanation and/or cleaning.
Jan Risn
Jan Risn 2019년 7월 19일
thank you, it looks like I've found a solution to my problem. thank you for contributing in justifying my program. im sorry i delete and edit my comment. thank you
Adam Danz
Adam Danz 2019년 7월 19일
편집: Adam Danz 2019년 7월 19일
Sometimes merely discussing the problems leads the questioner to their solution ;)

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

답변 (0개)

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

도움말 센터File Exchange에서 ThingSpeak에 대해 자세히 알아보기

질문:

2019년 7월 17일

편집:

2019년 7월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by