If using R2014b or later, download the following updated submission to connect to ThingSpeak.
This submission for R2013a, R2013b and R2014a enables MATLAB to access sensor data stored on ThingSpeak.
ThingSpeak is an IoT analytics platform that lets you collect and store sensor data and develop Internet of Things applications. ThingSpeak support from MATLAB lets you analyze and visualize data stored on ThingSpeak.com or on private installations of the ThingSpeak server. The submission also includes a pdf file which documents the function.
For more information see:
MathWorks Internet of Things Team (2020). ThingSpeak support from MATLAB (R2013a-R2014a) (https://www.mathworks.com/matlabcentral/fileexchange/46714-thingspeak-support-from-matlab-r2013a-r2014a), MATLAB Central File Exchange. Retrieved .
Thank you. Works perfect.
When I use webread to read a table, I get the data but it takes a while to reformat it. If not all fields are set every time, webread provides no way of telling on which entries the fields were left out.
thingSpeakFetch formats the table for me and fills it with NaN where left empty.
Could you perhaps open up the source code? It would be interesting to see how you make that translation.
Syed, the particular command you are attempting to execute is to fetch data from a private ThingSpeak installation. To fetch data from a public channel on ThingSpeak.com, use the syntax format specified in Example 1 to Example 3. Change the channel number in the example to the channel that you want to fetch data from.
Thank you.. Looking for such feature.
Updated description indicating a new version available for R2014b and higher.
Updated examples and documentation.
Added new IoT resource link in description.
Updated file and description.