Main Content

Results for

Dear all,
in the Matlab Analysis I use twice the fuinction thingSpeakRead to read data from a channel, from two different fields.
The problem is that so far, only one of the values is read properly and the other one delivers NaN.
What could be the reason?
Thank you!
Here's my code:
% TODO - Replace the [] with channel ID to read data from:
readChannelID = [xxx];
% TODO - Enter the Read API Key between the '' below:
readAPIKey = 'xxxxxxxx';
% TODO - Replace the [] with channel ID to write data to:
writeChannelID = [xxx];
% TODO - Enter the Write API Key between the '' below:
writeAPIKey = 'xxxxxx';
%% Read Data %%
%data = thingSpeakRead(readChannelID, 'ReadKey', readAPIKey);
temperature = thingSpeakRead(xxx,Fields=[1])
humidity = thingSpeakRead(xxx,Fields=[8])