Aarya O in MATLAB Answers
上次活动时间: 2022-6-19

I am using the ThingSpeak library to import public weather data, and I wanted to tabulate this data as a matrix. I have copied my code and the output below: data = thingSpeakRead(12397,'Fields',[1,4],NumPoints=50,OutputFormat='TimeTable') data = 50×2 timetable Timestamps WindDirectionNorth0Degrees TemperatureF ____________________ __________________________ ____________ 18-Jun-2022 19:30:23 105 60.5 18-Jun-2022 19:31:23 210 60.5 18-Jun-2022 19:32:23 92 60.7 18-Jun-2022 19:33:23 148 60.5 18-Jun-2022 19:34:23 192 60.5 18-Jun-2022 19:35:23 162 60.7 18-Jun-2022 19:36:23 118 60.7 18-Jun-2022 19:37:23 171 60.7 18-Jun-2022 19:38:23 145 60.7 : : : 18-Jun-2022 20:11:23 160 59.8 18-Jun-2022 20:12:23 174 59.6 18-Jun-2022 20:13:23 182 59.5 18-Jun-2022 20:14:23 112 59.5 18-Jun-2022 20:15:23 205 59.3 18-Jun-2022 20:16:23 196 59.3 18-Jun-2022 20:17:23 158 59.3 18-Jun-2022 20:18:23 158 59.3 18-Jun-2022 20:19:23 152 59.1 How can I import the data so that each category of data populates a column in a larger matrix? I am looking to create a matrix with WindDirectionNorth0Degrees in one column (this is Field 1), and TemperatureF in another column (this is Field 2), so that I can later plot these two against each other to analyze trends. Thank you all for your time.

关于 ThingSpeak

The community for students, researchers, and engineers looking to use MATLAB, Simulink, and ThingSpeak for Internet of Things applications. You can find the latest ThingSpeak news, tutorials to jump-start your next IoT project, and a forum to engage in a discussion on your latest cloud-based project. You can see answers to problems other users have solved and share how you solved a problem.