Average and Median Feed Parameters | ThingSpeak API | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
Average and Median Feed Parameters
Avatar
gpc

Silver
Forum Posts: 5
sp_UserOfflineSmall Offline
1
February 20, 2017 - 4:16 pm
sp_Permalink sp_Print sp_EditHistory

Hello everyone, 1st time poster here.

I have been using the chart API for awhile, does almost everything I need.  In my application, the average and median feed parameters could be even more useful if zero valued data could be excluded.

Is it possible? i.e., only average non-zero values

Avatar
Vinod

Forum Posts: 152
sp_UserOfflineSmall Offline
2
February 20, 2017 - 5:02 pm
sp_Permalink sp_Print

You can easily define your own custom visualization using the MATLAB Visualization app. 

Avatar
Hans
Natick, MA

Forum Posts: 385
sp_UserOfflineSmall Offline
3
February 20, 2017 - 5:04 pm
sp_Permalink sp_Print

Welcome to ThingSpeak! 

I never tried average with the min option. You could try it and let me know if that works. 

Add min=. 01 to your request. 

Avatar
gpc

Silver
Forum Posts: 5
sp_UserOfflineSmall Offline
4
February 20, 2017 - 9:39 pm
sp_Permalink sp_Print

Vinod said
You can easily define your own custom visualization using the MATLAB Visualization app.   

I thought about that, but I would like to publish it as a link with the api key included.  So, auto update, and the rest.

Is it possible to do so with a Matlab plot?

Avatar
gpc

Silver
Forum Posts: 5
sp_UserOfflineSmall Offline
5
February 20, 2017 - 9:40 pm
sp_Permalink sp_Print

Hans said
Welcome to ThingSpeak! 

I never tried average with the min option. You could try it and let me know if that works. 

Add min=. 01 to your request.   

Didn't work.  The min parameter excludes values from the plot, but not from the average/median computation.

Wish it did, that would make things easier.

Avatar
Vinod

Forum Posts: 152
sp_UserOfflineSmall Offline
6
February 20, 2017 - 10:46 pm
sp_Permalink sp_Print sp_EditHistory

gpc said

I thought about that, but I would like to publish it as a link with the api key included.  So, auto update, and the rest.

Is it possible to do so with a Matlab plot?  

 I'm not sure I understand what you will be publishing. Are you looking to publish a web page with a plot that changes with time of the average of values in a ThingSpeak channel with the average computed only of non zero values?

If so, you can set up a MATLAB Analysis app that dynamically computes the average and inserts it into a "derived channel". You can then use normal ThingSpeak visualizations on the data in that channel. The MATLAB Analysis can be driven periodically using TimeControl, or a react triggered by data insertion into the "measurement channel".

An easier to implement solution may be to have a MATLAB analysis that only posts non-zero values from the "measurement channel" into a derived channel. The analysis could be scheduled using the TimeControl or using Reacts. Then you can use the normal visualizations in the "derived channel", including average, median, etc.

Avatar
gpc

Silver
Forum Posts: 5
sp_UserOfflineSmall Offline
7
February 21, 2017 - 1:37 pm
sp_Permalink sp_Print

Ok, I guess I need to get myself educated with the functionality you described.  Thx.

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
29 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 250

Vinod: 152

piajola: 74

vespapierre: 63

cstapels: 60

Adarsh_Murthy: 59

Newest Members:

bharad

mikebradley

gilloliver

chputney

fibula

namansahore

Forum Stats:

Groups: 4

Forums: 17

Topics: 1261

Posts: 4400

 

Member Stats:

Guest Posters: 1

Members: 5588

Moderators: 0

Admins: 2

Administrators: Hans, lee