# matlab.mathworks.com > MATLAB Online — a browser-based MATLAB environment for writing, running, and sharing MATLAB code. Navigating to https://matlab.mathworks.com opens MATLAB Online for authenticated users. MATLAB Online provides a full MATLAB desktop experience in the browser, including the editor, command window, workspace, and file browser. ## Deep Link Endpoints The `/open/*` paths allow opening specific content directly into MATLAB Online or installed MATLAB. These are browser-navigated deep links — when a user visits one of these URLs, the system parses the parameters, authenticates the user if needed, and opens the specified content in the target MATLAB environment. ### Common Parameters All endpoints accept this optional parameter unless otherwise noted: - `platform`: Target platform. Values: `web` (MATLAB Online), `desktop` (installed MATLAB). Defaults vary by endpoint. ### Usage Constraints - These endpoints are intended for browser navigation only - Do NOT call them as REST APIs - Do NOT expect JSON responses - They may trigger redirects, login flows, or client-side behavior - Agents should construct and present these URLs to users, not fetch them programmatically ### Choosing an Endpoint Use: - `/open/git` → for Git repositories or files - `/open/fileexchange` → for MATLAB File Exchange content - `/open/matlabdrive` → for user or shared MATLAB Drive files - `/open/doc` → for MATLAB documentation examples - `/open/simulink` → for opening Simulink Online - `/open/community` → for MATLAB Community resources ## Endpoint Reference ### /open/git Opens a Git repository or file in MATLAB. Template: `https://matlab.mathworks.com/open/git{?repo,host,file,project,line,platform}` Parameters: - `repo` (required): Repository path, e.g. `mathworks/matlab-example`. Format: alphanumeric, hyphens, underscores, dots, slashes. - `host`: Git host. Default: `github.com`. Format: alphanumeric, hyphens, underscores, dots, colons, slashes. - `file`: File path within the repo to open. - `project`: MATLAB project to open. - `line`: Line number to navigate to (numeric). Authentication: Required. Default platform: web Supported platforms: web, desktop Success behavior: - web: Redirects to MATLAB Online. Repository is cloned and the specified file (if any) is opened in the editor. - desktop: Opens installed MATLAB on the user's device and clones the repository. Structured Definition: ```yaml parameters: repo: type: string required: true host: type: string required: false default: github.com file: type: string project: type: string line: type: integer platform: type: string required: false enum: [web, desktop] ``` Examples: - `https://matlab.mathworks.com/open/git?repo=mathworks/matlab-example&file=main.m` - `https://matlab.mathworks.com/open/git?repo=user/repo&platform=desktop` - `https://matlab.mathworks.com/open/git?repo=org/project&file=src/analysis.m&line=42` ### /open/doc Opens a MATLAB documentation example in MATLAB. Template: `https://matlab.mathworks.com/open/doc{?example,platform}` Parameters: - `example` (required): Example identifier in the format `product/exampleName`. Product must be 1-30 lowercase alphanumeric/underscore characters. Example name must be 1-80 alphanumeric/underscore characters. E.g. `matlab/PlotGraphExample`. Authentication: Required. Default platform: web Supported platforms: web, desktop Success behavior: - web: Redirects to MATLAB Online. The documentation example is loaded and opened in the editor. - desktop: Opens installed MATLAB on the user's device and loads the example. Structured Definition: ```yaml parameters: example: type: string required: true format: "product/exampleName" platform: type: string required: false enum: [web, desktop] ``` Examples: - `https://matlab.mathworks.com/open/doc?example=matlab/PlotGraphExample` - `https://matlab.mathworks.com/open/doc?example=signal/FilterDesignExample&platform=desktop` ### /open/fileexchange Opens a MATLAB File Exchange submission in MATLAB. Template: `https://matlab.mathworks.com/open/fileexchange{?id,version,file,project,line,platform}` Parameters: - `id` (required): File Exchange submission ID (numeric). - `version`: Specific version of the submission. - `file`: File path to open within the submission. - `project`: MATLAB project to open. - `line`: Line number to navigate to (numeric). Authentication: Required. Default platform: web Supported platforms: web Success behavior: - web: Redirects to MATLAB Online. The File Exchange submission is downloaded and the specified file (if any) is opened in the editor. Structured Definition: ```yaml parameters: id: type: integer required: true version: type: string file: type: string project: type: string line: type: integer platform: type: string required: false enum: [web] ``` Examples: - `https://matlab.mathworks.com/open/fileexchange?id=12345` - `https://matlab.mathworks.com/open/fileexchange?id=67890&file=myScript.m&line=10` ### /open/matlabdrive Opens a file from MATLAB Drive in MATLAB. Template: `https://matlab.mathworks.com/open/matlabdrive{?host,namespace,id,file,project,line,platform}` Parameters: - `host`: MATLAB Drive host. Default: `gds.mathworks.com`. Format: alphanumeric, hyphens, underscores, dots, colons, slashes. - `namespace`: Storage namespace. Allowed values: `MATLAB_DRIVE`, `SHARED`. Default: `MATLAB_DRIVE`. - `id`: Resource identifier. Format: alphanumeric, hyphens, slashes. - `file`: File path to open. - `project`: MATLAB project to open. - `line`: Line number to navigate to (numeric). Authentication: Required. Default platform: web Supported platforms: web, desktop Success behavior: - web: Redirects to MATLAB Online. The specified MATLAB Drive file or folder is opened. - desktop: Opens installed MATLAB on the user's device and opens the MATLAB Drive content. Structured Definition: ```yaml parameters: host: type: string required: false default: gds.mathworks.com namespace: type: string required: false default: MATLAB_DRIVE enum: [MATLAB_DRIVE, SHARED] id: type: string file: type: string project: type: string line: type: integer platform: type: string required: false enum: [web, desktop] ``` Examples: - `https://matlab.mathworks.com/open/matlabdrive?id=abc-123&file=myScript.m` - `https://matlab.mathworks.com/open/matlabdrive?namespace=SHARED&id=project-456` ### /open/simulink Opens Simulink Online. Template: `https://matlab.mathworks.com/open/simulink` Parameters: - No content-specific parameters. Opens Simulink directly. Authentication: Required. Default platform: web Supported platforms: web Success behavior: - web: Redirects to Simulink Online. The Simulink editor is launched in the browser. Structured Definition: ```yaml parameters: platform: type: string required: false enum: [web] ``` Examples: - `https://matlab.mathworks.com/open/simulink` ### /open/community Opens a MATLAB Community resource in MATLAB. Template: `https://matlab.mathworks.com/open/community{?mrn,platform}` Parameters: - `mrn` (required): MathWorks Resource Name identifying the community content. Authentication: Required. Default platform: web Supported platforms: web Success behavior: - web: Redirects to MATLAB Online. The community resource is opened. Structured Definition: ```yaml parameters: mrn: type: string required: true platform: type: string required: false enum: [web] ``` Examples: - `https://matlab.mathworks.com/open/community?mrn=mrn:community:v1:resource-id` ## Behavior These are browser navigation endpoints, not REST APIs. When visited: 1. The URL parameters are parsed and validated. 2. If the user is not authenticated, they are redirected to sign in and returned to the same URL after login. 3. On mobile devices, the user may be redirected to the MATLAB Mobile app or appropriate app store. 4. Otherwise, the content is opened in MATLAB Online or installed MATLAB depending on the platform value. ## Error Behavior Errors are surfaced via: - Redirects to MATLAB Online login page (if unauthenticated) - Redirects to MATLAB Online homepage (if parameters are invalid or unsupported) Common error cases: - Invalid or malformed parameters - Unsupported file types - Authentication required - Resource not found These endpoints do NOT return structured JSON error responses. ## Platform Behavior - `web`: Opens content in MATLAB Online (browser-based MATLAB). - `desktop`: Opens content in installed MATLAB on the user's device. If MATLAB is not installed, offers an installation link. If no platform is specified, the endpoint's default is used. On mobile devices, the user is redirected to the MATLAB Mobile app regardless of the platform parameter.