Practical overview
When it fits
Use it when you want MATLAB functions or examples for connecting a MATLAB workflow to a supported LLM API, or when you want to explore the repository's documented example patterns.
Who it is for
- MATLAB users who want to call LLM APIs from scripts or workflows.
- Developers exploring chat, structured output, tool calling, image tasks, or retrieval-augmented generation in MATLAB.
Documented uses
- Generate responses to natural-language prompts and manage chat history.
- Produce JSON-formatted or structured output and use function or tool calling.
- Generate, edit, or describe images through the OpenAI Images API.
- Explore examples for streaming text, document summarization, data analysis, agent workflows, and retrieval-augmented generation.
Requirements & limits
Requires MATLAB R2024a or newer. MATLAB Online supports connections to OpenAI and Azure; Ollama use requires installed MATLAB and add-on installation through Add-On Explorer or by cloning the repository. The repository states that it will no longer receive new features.
- The documented stack is MATLAB; MATLAB R2024a or newer is required.
- Available connections and setup differ by environment: MATLAB Online documents OpenAI and Azure connections, while Ollama requires installed MATLAB.
- Some examples require additional toolboxes, including Text Analytics Toolbox, Curve Fitting Toolbox, or Optimization Toolbox and Global Optimization Toolbox.
- The repository says it will no longer receive new features.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install the MATLAB LLM add-on with Add-On Explorer
Install Large Language Models (LLMs) with MATLAB in an installed MATLAB release.
Before you start
- MATLAB R2024a or newer.
Steps
In MATLAB, open the Home tab and select Add-Ons in the Environment section.
In Add-On Explorer, search for “Large Language Models (LLMs) with MATLAB”.
Select Install.
Expected outcome
The add-on is installed in MATLAB.
Guide limitations
- To connect to Ollama, use an installed version of MATLAB; MATLAB Online supports connections to OpenAI and Azure.
- The add-on will no longer receive new features.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 28 November 2026
- Original website title
- matlab-deep-learning/llms-with-matlab · Official homepage title · retained in its source language
Related options
MATLAB AI Agent SDK — The repository README points to its research preview as a simplified approach to building LLM and agentic applications in MATLAB.

