MATLAB is looking forward to having an intelligent AI programming assistant similar to GitHub Copilot
In the past two years, large language models have brought us significant changes, leading to the emergence of programming tools such as GitHub Copilot, Tabnine, Kite, CodeGPT, Replit, Cursor, and many others. Most of these tools support code writing by providing auto-completion, prompts, and suggestions, and they can be easily integrated with various IDEs.
As far as I know, aside from the MATLAB-VSCode/MatGPT plugin, MATLAB lacks such AI assistant plugins for its native MATLAB-Desktop, although it can leverage other third-party plugins for intelligent programming assistance. There is hope for a native tool of this kind to be built-in.
9 Comments
Sign in to participate
I have submitted a few feature requests to Mathworks on this very topic. I use Cursor with the MATLAB plugin but like others here, I find the workflow less than ideal.
Mathworks seem to view MATLAB as the flagship software development platform for users who are domain experts, but not necessasrily software developers. This certainly describes my own position, and for me, an LLM code assistant fully integrated into the MATLAB IDE that is codebase-aware, RL-trained on MATLAB documentation, and able to see the workspace, command line output etc, would be of massive benefit.
This functionality would make it a no-brainer to spend the money on a licence if and when I must relinquish my academic licence. Without this functionality, I would likely just migrate to using Python.
Looking forward to seeing updates in this space.
In the meantime, I've been using Cursor IDE (an AI forward fork of VS Code) with the Matlab VS Code extension made by Mathworks. I'm able to pick my LLM from ChatGPT or Claude. The Matlab extension makes it possible to execute code from the Cursor IDE. There is still missing functionality with Cursor + Matlab extension that a native Matlab IDE with AI would enable. E.g. a native implementation would give the LLM info about the dimensions and class of each variable in the workspace, and access to the command history, etc. I have a workaround for this where every error and warning get written to a log file, and a script that writes the size and class of all workspace variables to a text file. Then these text files are readible by Cursor. This lets me say simply to Cursor: "debug the error using the log files"
Also, it is somewhat remarkable how well ChatGPT and Claude write Matlab given that these LLM probably received little to no post-training directly on Matlab since executing Matlab isn't opensource. Mathworks could take pre-trained LLM and teach it to debug Matlab with closed-loop reinforcement learning or do other post-training so that the LLM provides helpful suggestions.
I have heard rumours that something along this line is being worked on. Not sure when it will arrive.
Have you seen this blog post? 4 ways of using MATLAB with Large Language Models (LLMs) such as ChatGPT and Ollama
I am with you on this and this post shows that MathWorks has been actively looking into this space. It's promising!