Background

In programming and engineering, staying ahead of the curve is crucial.

MathWorks is committed to helping the community of users accelerate their learning and building processes at MathWorks. With the rapid advancement of technology, including Generative AI, large-language models (LLMs), and tools like ChatGPT, they recognised the immense potential these models offer to assist users in finding answers, generating initial drafts of code, and simplifying complex engineering problems.

As you probably know, I am a huge fan and created a video on MatGPT not too long ago. MatGPT is a MATLAB app powered by ChatGPT class that allows you to access the ChatGPT API provided by OpenAI easily. With the app, you can load a list of prompts for specific use cases and easily engage in conversations. If you're new to ChatGPT and prompt engineering, MatGPT is a great way to learn to code and develop project ideas for your studies and even your day-to-day work.

One of the things I love about MathWorks is that they diligently listen to user feedback and finally crafted a dedicated space for us to explore these possibilities.

Today, they announce the MATLAB AI Chat Playground open to all users.


Getting Started with the MATLAB AI Chat Playground

To access this tool, head to the MATLAB Central community and select the AI Chat Playground. It's a space where you can experiment with Generative AI to facilitate your MATLAB-related tasks.

The MATLAB AI Chat Playground
The MATLAB AI Chat Playground

Known Limitations

Before diving in, it's essential to be aware of the system's current limitations. The AI Chat Playground is primarily optimised to assist with MATLAB-related input, which includes various toolboxes for deep learning, statistics and machine learning, optimisation, control systems, and signal processing. Please note that it needs to learn more about other MathWorks products like Simulink.


How to Use the MATLAB AI Chat Playground

The playground has a chat panel adjacent to a lightweight MATLAB code editor. To use its power, enter natural language prompts in the chat panel to receive explanations and code snippets. The AI can also continue the conversation by offering follow-up prompts or changing the output based on your feedback.

If you need help determining where to begin, you can always try one of the onboarding prompts to get the ball rolling.

As you engage with the AI, you'll receive explanations and code that can teach you about various MATLAB features, ways to interact with functions and new concepts. It's an excellent way to learn and expand your knowledge.

If you want to try out the generated MATLAB code, select the insert icon next to the code and then click the run button. This will execute the code and display the results. Select the copy button to work with the code in your own MATLAB editor or Visual Studio Code.

Original post by Hans Scharler (Source)

Your input is invaluable in helping us enhance the AI's output and refine the overall user experience over time.


Use Cases

Here are some everyday use cases for the MATLAB AI Chat Playground that our users have found helpful:

  1. Ask Questions: Start by asking basic technical computing questions like "What's an eigenvalue?" or "How do I customise a line plot?"
  2. Generate Ideas: If you need inspiration or ideas, the AI Chat Playground can assist you. For example, you can ask, "Give me some ideas on visualising large amounts of rainfall data" or "My data is noisy. What can I do to fix it?"
  3. Get Code: One of the most potent applications is obtaining MATLAB code. Enter high-level instructions like "Create some data, construct a grid of query points, interpolate the grid, and plot the results" or "Roll two six-sided dice 1000 times and plot the sum of each roll."

Conclusion

Share what you have learned using the MATLAB AI Chat Playground on LinkedIn or Twitter, and tag me. Share your experiences within the Generative AI discussion area of the MATLAB Central community.


If this post was helpful to you, consider subscribing! 🙂

And if you would love to see more on coding and engineering topics, please comment under this post!👇

Keep engineering your mind! ❤️

Jousef