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:
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.
I am trying to access my private thingspeak server which is running on my own laptop. I am using the following syntax but get matlab operator error
[d,t] = thingSpeakFetch(6,'NumPoints',10,'URL',http://0.0.0.0:3000);
Error: Unexpected MATLAB operator.
Is the problem using 0.0.0.0? Do I need to associate a name not an IP address?
I tried localhost:3000 also but get same error message. I can access my own thingspeak server with typing in localhost:300 or 0.0.0.0:3000
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.