{"id":3385,"date":"2023-11-27T11:04:36","date_gmt":"2023-11-27T16:04:36","guid":{"rendered":"https:\/\/blogs.mathworks.com\/iot\/?p=3385"},"modified":"2023-12-14T09:29:36","modified_gmt":"2023-12-14T14:29:36","slug":"an-interview-with-matlab-playground-build-your-iot-analysis-and-plots-for-thingspeak","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/iot\/2023\/11\/27\/an-interview-with-matlab-playground-build-your-iot-analysis-and-plots-for-thingspeak\/","title":{"rendered":"An interview with MATLAB playground: Build your IoT Analysis and Plots for ThingSpeak"},"content":{"rendered":"<p>The <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/playground\/new\">MATLAB AI Chat Playground<\/a> was launched on the MATLAB Central community at the end of November. I recently got the chance the interview the chatbot about ThingSpeak. I was curious how much it knew about building IoT projects on ThingSpeak and data analysis with MATLAB.<\/p>\n<p>Here are some excerpts from my first conversation.<\/p>\n<p>Me: <em>Can you read and plot the temperature from field 4 of the weather station at ThingSpeak channel 12397? Show 120 minutes.<\/em><\/p>\n<p>AI:<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/firstCode.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-3394 size-full\" src=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/firstCode.png\" alt=\"\" width=\"624\" height=\"216\" \/><\/a><\/p>\n<p>Great, lets see what the code does by inserting it into the code editor and clicking run.<\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/playgroundwithboxes.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-3466 size-large\" src=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/playgroundwithboxes-1024x604.png\" alt=\"\" width=\"1024\" height=\"604\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Woah! &#x1f92f;I\u2019m pretty impressed. Lets go a little further.\u00a0<\/p>\n<p>Me: <em>Can you add a 30-point moving average and label the maximum and minimum values of the moving average?<\/em><br \/><a href=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/airesponse.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-3445 size-full\" src=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/airesponse.png\" alt=\"\" width=\"656\" height=\"129\" \/><\/a><\/p>\n<pre class=\"language-matlab\" tabindex=\"0\"><code class=\"matlab language-matlab\"><span class=\"token comment\"><a href=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/smothAIcode.png\"><img decoding=\"async\" loading=\"lazy\" width=\"988\" height=\"606\" class=\"alignnone size-full wp-image-3454\" src=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/smothAIcode.png\" alt=\"\" \/><\/a><\/span> <\/code><a href=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/movAvg.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-3403 size-full\" src=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/movAvg.png\" alt=\"\" width=\"624\" height=\"426\" \/><\/a><\/pre>\n<p>And it can keep going! Even though I&#8217;m a seasoned ThingSpeak user, the AI helps me improve my efficiency. Lets say I didn&#8217;t know how to visualize some ThingSpeak IoT data. Lets ask it for ideas on types of MATLAB visualizations.<\/p>\n<p>Me: <em>What are some ideas to visualize colors from the cheerlights channel?<\/em><\/p>\n<p><a href=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/smothAIcode2.png\"><img decoding=\"async\" loading=\"lazy\" width=\"755\" height=\"137\" class=\"alignnone size-full wp-image-3457\" src=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/smothAIcode2.png\" alt=\"\" \/><\/a><\/p>\n<p>That&#8217;s great, the AI suggested frequency analysis on the colors.\u00a0 Even if I didn&#8217;t know how to effectively visualize this kind of data, the AI chat Playground gave me a direction to go.<\/p>\n<p>And don\u2019t forget to be friendly to the AI just in case\u2026<br \/><a href=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/niceAI.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-3406 size-full\" src=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/niceAI.png\" alt=\"\" width=\"624\" height=\"380\" \/><\/a><\/p>\n<p>Try out the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/playground\/new\">playground<\/a> for your IoT projects, and let us know what your experience was.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/iot\/files\/2023\/11\/firstCode.png\" onError=\"this.style.display ='none';\" \/><\/div>\n<p>The MATLAB AI Chat Playground was launched on the MATLAB Central community at the end of November. I recently got the chance the interview the chatbot about ThingSpeak. I was curious how much it knew&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/iot\/2023\/11\/27\/an-interview-with-matlab-playground-build-your-iot-analysis-and-plots-for-thingspeak\/\">read more >><\/a><\/p>\n","protected":false},"author":175,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22,258,291,295,293],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/posts\/3385"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/users\/175"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/comments?post=3385"}],"version-history":[{"count":13,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/posts\/3385\/revisions"}],"predecessor-version":[{"id":3469,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/posts\/3385\/revisions\/3469"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/media?parent=3385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/categories?post=3385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/iot\/wp-json\/wp\/v2\/tags?post=3385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}