File Exchange

image thumbnail

ThingSpeak support from MATLAB (R2013a-R2014a)

Prototype Internet of Things applications using ThingSpeak and MATLAB

1 Download

Updated 08 Dec 2016

View License

If using R2014b or later, download the following updated submission to connect to ThingSpeak.
http://www.mathworks.com/matlabcentral/fileexchange/52244
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:
www.mathworks.com/thingspeak
www.mathworks.com/solutions/internet-of-things

Comments and Ratings (4)

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

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.

Updates

1.5.0.0

Updated description.

1.5.0.0

Updated description indicating a new version available for R2014b and higher.

1.4.0.0

Updated examples and documentation.

1.3.0.0

Added new IoT resource link in description.

1.2.0.0

Corrected description.

1.1.0.0

Updated file and description.

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: thingSpeakWriterClass

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor