MATLAB: 4 Day temperature comparison, including current day

temperature comparisonThingSpeak

How can I include the current day in the 3 day temperature comparison.
[datetime('today')-days(0),datetime('today')], gives an error

Best Answer

You can try to use the last minute of the current day, since it says starting date must be before than ending date
todayDate = datetime('today');
todayDate = todayDate + minutes(1439);
[datetime('today')-days(0),todayDate]