does not seem to matter whether it is a single or a double. The error is shorter if it is the double vs the single.
Invalid use of operator "
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Scott Milliken
el 27 de Feb. de 2020
Comentada: Scott Milliken
el 28 de Feb. de 2020
I was trying follow and replicate the example code for the Temperature/Humidity Matlab and continue to get the error as follows:
Error in /users/mss.system.Z1My17/Temperature Humidity Line:14 Column:5
In the line is the following:
13 thingSpeakWrite(writeChId, [temp, humidity, dewPointF], "Fields", [1,2,3]...
14 "TimeStamps", time, "Writekey", writeKey)
2 comentarios
Respuesta aceptada
Walter Roberson
el 27 de Feb. de 2020
Editada: Walter Roberson
el 27 de Feb. de 2020
The ... ends the line immediately. There is no implied separator inserted. So you have a ] from the numeric list followed by the content of the second line which is some spaces and then the literal, exactly as if you had written the numeric list and then some spaces and then the string.
[1,2,3] "TimeStamps"
all as one parameter. Numeric list followed by string is not valid syntax in this context. You need to add the missing comma.
5 comentarios
Más respuestas (0)
Comunidades de usuarios
Más respuestas en ThingSpeak Community
Ver también
Categorías
Más información sobre ThingSpeak en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!