"thingSpeakRead Numminutes" is giving different size vectors for different fields | MATLAB IoT Analytics | Forum


Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
"thingSpeakRead Numminutes" is giving different size vectors for different fields
No permission to create posts
November 7, 2020
10:34 am
New Member
Forum Posts: 1
Member Since:
November 7, 2020
sp_UserOfflineSmall Offline

I'm sending data from an instrument to this channel: 1135922, then processing it using Matlab Analysis, and writing it on this other channel 929257.

I'm reading the fields' data like this:
[fieldX,timestamps] = thingSpeakRead(readChannelID, 'Fields',1,'Numminutes',6,'ReadKey', readAPIKey)
fieldY = thingSpeakRead(readChannelID, 'Fields',2,'Numminutes',6,'ReadKey', readAPIKey)
fieldZ = thingSpeakRead(readChannelID, 'Fields',3,'Numminutes',6,'ReadKey', readAPIKey)
eulerR = thingSpeakRead(readChannelID, 'Fields',4,'Numminutes',6,'ReadKey', readAPIKey)
eulerP = thingSpeakRead(readChannelID, 'Fields',5,'Numminutes',6,'ReadKey', readAPIKey)
eulerY = thingSpeakRead(readChannelID, 'Fields',6,'Numminutes',6,'ReadKey', readAPIKey)
temperature = thingSpeakRead(readChannelID, 'Fields',7,'Numminutes',6,'ReadKey', readAPIKey)

The problem is, that every so often, the vectors end up with different number of elements with respect to each other. So, I end up having gaps in the processed data.

I have checked the data that I'm receiving from the instrument, and there is no gaps on the data. Every "timestamp" has ALL 8 fields of data, but Matlab Analysis is not reading it properly.

I wasn't having this problem with the free 15-seconds update rate, but when I upgraded to the paid license and started transmitting at about 2-3 sec, I started having the problem.

I would appreciate any help, as this is for my thesis and my deadline is in 2 weeks.

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
23 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

r0833965, UO266047, edelww50, Gianpaolo Vitali, fernando, phil

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457