Hi everyone
I would like to ask for help with this noobie issue in matlab Analysis
Im trying to use matlab analysis to calculate dewpoint from temp and humidity captured in one of my private channels, and publish it in a 3rd field in the same.
Here is the code:
readChId = 1341385;
readKey = 'AAA';
writeChId = 1341385;
writeKey = 'BBB';
[temp,time] = thingSpeakRead(1341385,'Fields',1,'NumPoints',20);
humidity = thingSpeakRead(1341385,'Fields',2,'NumPoints',20);
b = 17.62;
c = 243.5;
gamma = log(humidity/100) + b*temp./(c+temp);
dewPoint =c*gamma./(b-gamma)
thingSpeakWrite(writeChId,dewPoint,'Fields',3,...
'TimeStamps',time,'Writekey',writeKey);
I have actually two problems.
First: if I set the channel as private, I can't read it. This is the message from console (punto de rocío is the name of Matlab Analysis sketch)
///****************************************///
Error using punto de Rocío (line 8)
Specify a valid read API key, or make the channel public to avoid specifying the read API key.
///****************************************///
I tried to copy/paste from API KEYS, and channel information window from Matlab Analytic display.
I tried writing manually from keyboard.
I tried to renew "read api key", and add a new one, but error remains. The only viable solution was turn the channel to public, and I don't want to let it like that.
The second Problem.
If channel is public, the console procede with the calculation and show me results in the console, but, doesnt publish in the channel.
The console doesnt show any error, just the data processed. Channel doesnt show any data in visualization.
Please can you help me!!? What im doing wrong?
Here is the graphic of the field N°3 (without any data )
(PD I didnt find similar topics from community)
Thank You!