With Thingspeakread, can you ignore empty datpoints in order to go back further in time?

5 ビュー (過去 30 日間)
Don
Don 2024 年 9 月 19 日
回答済み: Supraja 2024 年 10 月 5 日
I have a channel with 8 fields. Fields 1 and 2 get data sent to them every 15 seconds.
I have a timed app that takes an average of the last 5 minutes of data from 1 and 2 and then enters that average into fields 3 and 4.
I have other apps that take longer averages and enters them in the other fields (5,6 and 7,8).
Can I read the data points in fields 3 and 4, ignore empty data, and still return 8000 points of data? All of them with actual data.
I have been using apps to put the averaging data into whole new channels so that there are no blank data points but this seems klunky and wasteful.

採用された回答

Supraja
Supraja 2024 年 10 月 5 日
Hello Don,
I understand that you are using 'thingspeakread' function and want to read values of specified data points.
Here is an example from the 'thingspeakread' documentation where only specified date range values are being read. You can use the similar syntax for your code.
[data,timestamps,channelInfo] = thingSpeakRead(12397,Fields=[1 4],...
DateRange=[datetime(2018,8,9,23,59,01),datetime(2018,8,10,0,02,52)])
For more information, please have a look at the documentation link below:
I hope this helps!

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVisualize Data についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by