Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Index in position 2 exceed array bounds when creating email

1 visualización (últimos 30 días)
Mthunzi Booi
Mthunzi Booi el 13 de En. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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 comentarios
KALYAN ACHARJYA
KALYAN ACHARJYA el 14 de En. de 2020
Editada: KALYAN ACHARJYA el 14 de En. de 2020
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 el 14 de En. de 2020
@Mthunzi There is a slight error in the doc, thanks for catching that.

Respuestas (0)

La pregunta está cerrada.

Comunidades de usuarios

Más respuestas en  ThingSpeak Community

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by