필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Index in position 2 exceed array bounds when creating email

조회 수: 1 (최근 30일)
Mthunzi Booi
Mthunzi Booi 2020년 1월 13일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi Team
I need some help on this error, How do i improve this issue?
data = thingSpeakRead(929272, "NumMinutes", 100);
aveTemp = mean(data(:,2)); // This is the line for an error "Index in position 2 exceeds array bounds"
apiKey = 'O6P4N8AVZWKNGK5U';
alertURL = "https://api.thingspeak.com/alerts/send";
options = weboptions("HeaderFields",["ThingSpeak-Alerts-API-Key", apiKey]);
alertBody = sprintf("The temperature is %0.2fF.", aveTemp);
alertSubject = sprintf("! Temperature exceeded 60.0F!");
if avg_temperature > 60.0
webwrite(alertURL, "body", alertBody, "subject", alertSubject, options);
end
  댓글 수: 4
KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 1월 14일
편집: KALYAN ACHARJYA 2020년 1월 14일
Just run the code, and just type the following in command window then "Enter" key
>>whos data
Please share the message you will receive.
Christopher Stapels
Christopher Stapels 2020년 1월 14일
@Mthunzi There is a slight error in the doc, thanks for catching that.

답변 (0개)

이 질문은 마감되었습니다.

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by