Use MATLAB Analysis to explore the data stored in ThingSpeak™ channels. Then use TimeControl to trigger your code at specific times or React app to trigger when a set condition is met. The app provides templates with sample code that you can use to perform analysis such as:
Calculate average humidity
Calculate dew point
Convert Celsius to Fahrenheit
Eliminate data outliers
Replace missing values in data
Analyze data from your ThingSpeak channel using MATLAB® functions and toolboxes in MATLAB Toolbox Access. After analysis, you can write data to a channel or create a visualization as described in MATLAB Visualizations App.
Click Apps > MATLAB Analysis.
Click New to get started with your code.
Select a template or an example with sample code that you can run.
Name: Enter a name for your analysis. Press enter, or click outside the name box anytime you change the name, and the stored name of your analysis is automatically updated.
MATLAB Code: Enter custom code, or modify the sample code with your data.
Save and Run: Click to save and execute the code.
Save: Click to save your analysis without running the code. An asterisk on this button indicates unsaved changes.
Output: This field displays the output of your code. Use it to debug and modify the code.
Clear Output: Click to clear the code output.
Schedule Actions: Select an action to schedule using this MATLAB code.
Receive notification of MATLAB analysis failure by email
Schedule your code to run at specified times.
Schedule your code to run when channel data meets a predefined condition.
Delete: Click to delete the analysis.
My Channels: Click this tab to see information about your saved channels, including:
Write and Read API Keys
Documentation: Click this tab for help using the MATLAB Analysis app
New Channel: Click to create a new channel to hold the values of your analyzed data.
The MATLAB Analysis app does not support figure generation, so you cannot generate any plots with this app.
Data written to ThingSpeak channels in MATLAB analysis must adhere to the posting rate limitations. You could lose data if you try to write to a channel multiple times within the period allowed by your license.