matlab analysis is not reading the latest values beyond a time limit | MATLAB IoT Analytics | Forum

Avatar

Please consider registering
Guest

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
matlab analysis is not reading the latest values beyond a time limit
No permission to create posts
March 18, 2019
4:45 pm
Avatar
junaid.5671
New Member
Members
Forum Posts: 3
Member Since:
March 18, 2019
sp_UserOfflineSmall Offline

hi,
when I read matlab values which are older than a few seconds (45 i guess) it returns NaN.

March 19, 2019
2:21 pm
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 861
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

Try exporting the data using the export recent data button on the private view or in the import export tag.
Are you updating multiple fields asynchronously? If you write to field 2, then field 1 will have a null value for that entry. Is your channel public? I can have a look.

March 22, 2019
10:19 pm
Avatar
junaid.5671
New Member
Members
Forum Posts: 3
Member Since:
March 18, 2019
sp_UserOfflineSmall Offline

Hi
Its like when I am making my channel public it reads values for a few hours and if its not public and also not shared then it reads values only for a few seconds. Now when I try to read data from other channels, for suppose this channel
channelCATC Library
Channel ID: 316426
Author: mojtaba93
Access: Public
I am able to get data which was posted in August 2018, where as when I replace the channel ID with my channel, It shows "NaN"
My channel ID is 688964, please have a look.

March 23, 2019
12:30 am
Avatar
junaid.5671
New Member
Members
Forum Posts: 3
Member Since:
March 18, 2019
sp_UserOfflineSmall Offline

it is that I am updating values to the fields through matlab analysis and to whatever fields I am writting it adds extra NaN values either in between the data or after the data and it continues to add NaN values.

March 26, 2019
3:07 pm
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 861
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

There are eight fields in your channel (and Location and Status). Anytime you update any field in the channel, it increases the number of entries. If you update only one field in an entry, all the other fields get a null or N/A value. I looked your data, all the data seems to be on 3/22 at present.
You seem to be updating at least fields 1, 2, and 5, but not at the same time.

Here is an example :

"feeds": [
{
"created_at": "2019-03-22T23:50:07-04:00",
"entry_id": 1,
"field1": null,
"field2": null,
"field3": null,
"field4": null,
"field5": "100",
"field6": null
},
{
"created_at": "2019-03-22T23:50:28-04:00",
"entry_id": 2,
"field1": null,
"field2": "100",
"field3": null,
"field4": null,
"field5": null,
"field6": null
},

Are you using an API call to read the data? If you post the format you are using to read the data, it will help us help you. For example, you can use the Read data API call,
https://www.mathworks.com/help/thingspeak/readdata.html
or thingSpeakRead() from MATLAB or ThingSpeak,
https://www.mathworks.com/help/thingspeak/thingspeakread.html
or you can use MQTT subscribe.
https://www.mathworks.com/help/thingspeak/mqtt-api.html

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
14 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:

khanhNguyen_CT, susyburr, quijano__, meosuckhoe, briskpanda, Dejw0089

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457