Any way to subset data from a single Channel (Eg. using thingspeakread) in a MATLAB Visualisation?

1 vue (au cours des 30 derniers jours)
Any pointers would be appreciated - I've been looking for a way to do this for hours now.
I have a single channel receiving data from multiple IOT devices including the device name (this is working just fine).
I'd like to plot a value (eg Temperature) over time by device on a single chart.
The bit I can't seem to do is find a way to retrieve data "Where DeviceID = xyz"
Any ideas please??

Réponses (1)

Cris LaPierre
Cris LaPierre le 29 Déc 2020
If you have all the data in a single matrix, then the plot function will treat each column as a separate series. Does this get you what you want?
  4 commentaires
N S
N S le 29 Déc 2020
Hi - I haven't started to create anything yet as I couldn't find a way to do the subset of data as I need to.
The data is pretty simple, just a numeric value by date/time. Approx 1 data point per device per minute, somewhere around 10 devices eventually. Does that help?
Cris LaPierre
Cris LaPierre le 29 Déc 2020
thinkSpeakRead returns the data as an array, table or timetable. From there, you can use normal indexing to select what to plot.
For an array, see here.
For tables and timetables, see here.

Connectez-vous pour commenter.

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by