{"id":151498,"date":"2024-04-10T13:39:22","date_gmt":"2024-04-10T17:39:22","guid":{"rendered":"http:\/\/www.bu.edu\/tech\/?page_id=151498"},"modified":"2024-05-02T08:56:23","modified_gmt":"2024-05-02T12:56:23","slug":"matlab","status":"publish","type":"page","link":"https:\/\/www.bu.edu\/tech\/support\/research\/software-and-programming\/generative-ai\/matlab\/","title":{"rendered":"GenAI in MATLAB"},"content":{"rendered":"<p><a name=\"top\"><\/a><\/p>\n<style>\n  p { text-align: justify; }\n  .image-container { float: right; width: 25%; margin-left: 20px; }\n<\/style>\n<div style=\"width:100%;\">\n<div class=\"image-container\">\n    <img loading=\"lazy\" src=\"\/tech\/files\/2024\/04\/mathworks-logo-full-color-rgb.png\" alt=\"\" width=\"560\" height=\"489\" class=\"alignnone size-full wp-image-151883\" \/>\n  <\/div>\n<p>While MATLAB provides a few options for integrating generative AI into your workflow, GitHub Copilot is not natively supported. However, there are other model options and an official MATLAB extension for VS Code detailed below.\n<\/p><\/div>\n<p><strong>Sections<\/strong><\/p>\n<ul>\n<li><a href=\"#gh\">MATLAB &#038; GitHub Copilot<\/a><\/li>\n<li><a href=\"#chat\">MATLAB AI Chat Playground<\/a><\/li>\n<li><a href=\"#openai\">Connect MATLAB to the OpenAI API<\/a><\/li>\n<\/ul>\n<p>    &nbsp;<br \/>\n    <a name=\"gh\"><\/a><\/p>\n<h2>MATLAB &#038; GitHub Copilot<\/h2>\n<ol>\n<li>Authenticate your GitHub Copilot license in VS Code following our <a href=\"https:\/\/www.bu.edu\/tech\/support\/research\/software-and-programming\/generative-ai\/vscode\/\">instructions here<\/a>\n        <\/li>\n<li>Load a MATLAB module, and install the official MathWorks MATLAB extension in VS Code.<br \/>\n        <img loading=\"lazy\" src=\"\/tech\/files\/2024\/04\/Screenshot-2024-04-25-105946-636x220.png\" alt=\"\" width=\"636\" height=\"220\" class=\"alignnone size-medium wp-image-151871\" srcset=\"https:\/\/www.bu.edu\/tech\/files\/2024\/04\/Screenshot-2024-04-25-105946-636x220.png 636w, https:\/\/www.bu.edu\/tech\/files\/2024\/04\/Screenshot-2024-04-25-105946-768x265.png 768w, https:\/\/www.bu.edu\/tech\/files\/2024\/04\/Screenshot-2024-04-25-105946.png 976w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/>\n        <\/li>\n<li>Create a new or open an existing MATLAB script file (<code><b>.m<\/b><\/code>) and deploy GitHub Copilot. Read more about this feature in MATLAB&#8217;s blog <a href=\"https:\/\/blogs.mathworks.com\/matlab\/2024\/03\/12\/matlab-extension-for-visual-studio-code-yes-it-works-with-github-copilot\/\">Matlab Extension for Visual Studio Code: Yes, it works with GitHub Copilot<\/a>.\n        <\/li>\n<\/ol>\n<p>    &nbsp;<\/p>\n<p>    <a name=\"chat\"><\/a><\/p>\n<h2>MATLAB AI Chat Playground<\/h2>\n<p>The <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/playground\">AI Chat Playground<\/a> is an optimized OpenAI model for use with MATLAB-related inputs, outputs, and toolboxes. This is a free-to-use product with &#8220;guardrails&#8221; to keep usage to MATLAB and Simulink.<\/p>\n<p>    &nbsp;<\/p>\n<p>    <a name=\"openai\"><\/a><\/p>\n<h2>Connect MATLAB to the OpenAI API<\/h2>\n<p>While GitHub Copilot cannot be accessed from within the MATLAB IDE, you can interface with OpenAI models natively. Please follow the instructions in MATLAB&#8217;s blog <a href=\"https:\/\/blogs.mathworks.com\/deep-learning\/2024\/01\/22\/large-language-models-with-matlab\/\">Large Language Models with MATLAB<\/a>.<\/p>\n<p>    &nbsp;<\/p>\n<div style=\"float: right;\">\n<p id=\"last-modified-timestamp\" style=\"margin: 0;\">Last updated: Loading&#8230;<\/p>\n<\/div>\n<p><script>\r\ndocument.addEventListener('DOMContentLoaded', function() {\r\n    \/\/ Get the content of the meta tag\r\n    var lastUpdatedContent = document.querySelector('meta[name=\"last-updated\"]').content;\r\n    \r\n    \/\/ Parse the content into a Date object\r\n    var lastUpdatedDate = new Date(lastUpdatedContent);\r\n    \r\n    \/\/ Format the date\r\n    var formattedDate = lastUpdatedDate.toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' });\r\n    \r\n    \/\/ Update the HTML element with the formatted date\r\n    document.getElementById('last-modified-timestamp').innerHTML = 'Last updated: ' + formattedDate;\r\n});\r\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>While MATLAB provides a few options for integrating generative AI into your workflow, GitHub Copilot is not natively supported. However, there are other model options and an official MATLAB extension for VS Code detailed below. Sections MATLAB &#038; GitHub Copilot MATLAB AI Chat Playground Connect MATLAB to the OpenAI API &nbsp; MATLAB &#038; GitHub Copilot&#8230;<\/p>\n","protected":false},"author":1692,"featured_media":0,"parent":151490,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/151498"}],"collection":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/users\/1692"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/comments?post=151498"}],"version-history":[{"count":10,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/151498\/revisions"}],"predecessor-version":[{"id":152023,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/151498\/revisions\/152023"}],"up":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/151490"}],"wp:attachment":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/media?parent=151498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}