The MATLAB Online Desktop: Functional Differences
The MATLAB Online Desktop: Functional Differences
The MATLAB Online Desktop: Functional Differences
Much of MATLAB Online is the same as the installed version, but there are differences that are due to
working inside a web browser. Some of those differences are highlighted in the video entitled, “The
MATLAB Desktop”, but not all of them. We’ve catagorized the difference you’ll see into three categories
below.
1. Functional differences: the behavior of installed MATLAB and MATLAB Online differ. These
differences are not in how code behaves but where different steps are required in MATLAB
Online to perform a task than the installed version.
2. User interaction differences: slightly different or more specific steps may need to be taken to
achieve a result navigating in MATLAB Online as opposed to the installed version.
3. File Management and Cloud Storage: this section details ways to move files to and from your
cloud storage and how to synchronize files with your computer (particularly useful if you have
both the installed version and MATLAB Online).
Functional Differences
Stopping long running commands
In desktop MATLAB you have two options to stop long running code:
In MATLAB Online, you only have the option to terminate the code by pressing the “Stop” button
located in the lower-right corner of the Command Window. After stopping the code, you can set a
breakpoint in the code to investigate the cause.
Desktop MATLAB automatically saves changes to an active file in the Editor Window when you click
away from the Editor.
MATLAB Online automatically saves changes approximately once a minute. Therefore, you could make
changes, test them at the command prompt without the changes being saved first. Before running the
file in the Command Window, habitually check the Save icon. If it is blue, there are unsaved changes to
the file. Click the icon to save before testing your code. You can also look for an * symbol next to the
filename in the Editor to identify a file with unsaved changes.
Comment wrapping
Unlike in desktop MATLAB, long comments will not automatically wrap to a new line in MATLAB Online.
This has no effect on code execution, but does affect readability of the code. You have to manually
create new comment lines in MATLAB Online.
Indenting of code in the Editor Window
Both desktop MATLAB and MATLAB Online use automatic indenting of code, however, the auto-
indentation used in MATLAB Online is different than the default used on the desktop. This difference is
purely cosmetic and has no effect on the execution of the code.
Startup/finish files
MATLAB enables users to set customizations using ‘startup.m’ and ‘finish.m’ files. However, these files
will not automatically run in MATLAB Online as they do on the installed version.
Depending on the active window, the functionality of a right-click action may belong to the web browser
or MATLAB Online. Thus, to copy and paste text/code in MATLAB Online use the ctrl+c/ctrl+v method.
1. Copying
a. Highlight the text to be copied
b. On the keyboard, press ctrl+c (if on a Mac use command+c)
2. Pasting
a. Left click with the mouse at the desired insertion point
b. On the keyboard, press ctrl+c (or command+c on a Mac).
If a large amount of output is printed to the command window, you may sometimes find that the
bottom of the output and the command prompt are not visible. Look for a scroll bar to the right of the
command window to scroll to the bottom.
Documentation Windows
Using the help and doc commands work just like the desktop. You can also use the Search bar on the top
right corner of MATLAB Online to search the documentation. Documentation will be displayed in a new
pop-up window. If the pop-up window does not appear, check to see if you have any pop-up or
adblockers that may be preventing them from being displayed. Either disable the pop-up blocker or
permit pop-ups from mathworks.com to use the documentation.
Below are 4 ways to get files from your computer into MATLAB Online but you need only one. If you’re
new to MATLAB and using the free license for this course, you probably don’t need to add any files
yourself at first. Just follow the instructions provided with the first programming assignment. This
assignment is part of (in week 4, and it is called “Homework 3”) and all the homework materials will be
added to your MATLAB Drive storage.
As you progress through this course, or you if you already have MATLAB installed, you’ll probably want
to add files from your computer to MATLAB Drive. There are several ways to do this (if you have
MATLAB installed on your computer we recommend using method 4 below).
While the license for the course is for 12 weeks, you always have access to your cloud files at
https://drive.matlab.com. However, you may still want to download your files to keep after the course.
Again, there are several ways to download files.
1. Download from MATLAB Online using the download button – If only downloading a single file or
two, this is the easiest way:
a. Inside MATLAB Online, select the file to download in the Current Folder (only one file at
a time is supported)
b. In the Home tab under “File” click “Download”
c. Select the location on your computer to download the file
d. Click Save
2. Download from MATLAB Online using the ZIP function – Use this method if you have many files
to download.
a. Navigate to the folder containing the files to download
b. Use the ZIP function to create a zip file. See the documentation for ZIP for syntax and
examples of using the ZIP function.
c. In the Current Folder, select the newly created zip-file.
d. In the Home tab under “File” click “Download”
e. Select the location on your computer to download the file
f. Click Save
g. In your computer, unzip the folder to view and use the files.
3. Use the MATLAB Drive website at https://drive.matlab.com – Similar to method 1, only one file
at a time is supported.
a. Login to the MATLAB Drive webpage
b. Navigate to the file to download and select it.
c. In the top of the page, near the center, click Download
d. Select the location on your computer to save the file
e. Click Save
4. Use MATLAB Drive Connector – If you use MATLAB Drive Connector, you cloud files are
automatically synced to your computer! Follow the install steps above (you only need to install
once so don’t repeat this).
a. Go to the MATLAB Drive Connector product page and select the installation for your OS.
b. Follow the steps to install MATLAB Drive.
i. Make sure to use the same MathWorks account you use to access MATLAB
Online.
ii. Make a note of the location where the MATLAB Drive folder will be placed on
your computer. For example, on Windows, the default location is:
“C:\Users\<your_windows_user_name>