MATLAB® and Simulink® products offer support for collecting your IoT data and analyzing it in the cloud. One option for storing your data as you prototype your IoT system is the ThingSpeak™ IoT analytic platform, which collects data from your connected things. The ThingSpeak web service provides a RESTful API and an MQTT broker for posting or publishing your data. If you want to post your data from an Arduino®, Raspberry Pi™, or BeagleBone Black connected to the Internet, see Developing and Testing Smart Devices for Your IoT System Using Simulink. Once data is in ThingSpeak, you can perform preprocessing, visualizations, and analysis in the cloud using integrated MATLAB.
If you have collected your data in ThingSpeak, you can use
time control features of ThingSpeak to execute MATLAB code based on characteristics of your data or based on a fixed time schedule. For example, if you are storing temperature data in ThingSpeak, you can execute MATLAB code when the temperature reading on your channel falls below 0 C, or you could configure ThingSpeak to automatically execute MATLAB code every five minutes as your data arrives in ThingSpeak.
To analyze IoT data on cloud or enterprise-based systems other than ThingSpeak, you have several options. With MATLAB Compiler SDK™, you can package MATLAB programs into software components for integration with other programming languages like C++, Java, or .NET. With MATLAB Production Server™, you can manage the deployment of MATLAB programs as work requests in cloud or enterprise production environments.
If your data is already stored in a database, on a private cloud, or in another IoT platform that has a web API, you can access it from MATLAB using Database Toolbox™ or built-in web services commands provided by MATLAB. Database Toolbox allows you to access data stored in any ODBC-compliant and JDBC-compliant databases using SQL commands. MATLAB also provides
urlread commands that allow you to easily retrieve data from other web services.
ThingSpeak Support Toolbox for Desktop MATLAB(Hardware Support)
ThingSpeak IoT Platform (Web Service)
Introduction to ThingSpeak (3:13)
ThingSpeak Support Toolbox (File Exchange Entry)
Xively Read Function (File Exchange Entry)
Download Climate Data from Web Service (Example)
Retrieving Data from Databases Using SQL Commands (Product Features)
Eric Wetjen, Internet of Things Expert