Ok so i will try to simplify my problem here and explain it. I have some sensor readings of power with corresponding time stamps. An example extract is shown below.
2021-04-01 15:07:19 0.0834
2021-04-01 15:08:02 0.0726
2021-04-01 15:08:42 0.0123
2021-04-01 15:09:24 0.0999
As you can see that the sensor data unfortunately has no fixed time interval between data readings.
My goal is to create a new table with a fixed time interval of one minute. In this table the Timestamp will go from 2021-04-01 00:00:00 till
2021-04-01 23:59:00 ( A total of 1440 readings for 24 hours). I have done this part already.
Now comes my question. How to i linearly interpolate the data above to match up with with my new time stamps? The challenge is also to automatically fill in the power readings with '0' on timestamps where no data was recorded.
What i mean to say is, the raw sensor data file dosent start its readings on 2021-04-01 00:00:00, but on a random time of the day,
like 2021-04-01 07:19:51. Thats why i want to automatically fill in power values with 0 when no data is recorded.
Calling out on all MATLAB heros out there to help me. Thanks alot in advance!
Note: I'll attach the real sensor file so you guys can get the feel of the problem.