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
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.
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.
Most Users Ever Online: 114
Currently Browsing this Page:
Guest Posters: 1
Administrators: Hans, lee