Skip to content
Related Articles

Related Articles

MATLAB – Environment Setup

Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 04 Mar, 2022
Improve Article
Save Article

In this article, we are going to discuss setting up a MATLAB Environment from scratch, i.e., from installation to understanding the environment. But before going to that, let’s first understand what exactly is MATLAB and its environment.

MATLAB is a programming language, which is specially designed for engineers and scientists, who do scientific calculations. It makes mathematical calculations easier to evaluate. With thousands of built-in functions, you can perform complex mathematical equations with ease.

Matlab is in a wide range of applications, which include different industrial purposes and academic purposes. It can be used in deep learning and machine learning, image processing, digital communication through signal processing, computation of finance and biology, and so on. 

MATLAB Environment:

Matlab environment is an interactive platform, where you can write and run your Matlab codes, and even can plot them. It allows you to do statistical calculations as well as visualize them too. Matlab has a wide range of tools, that might be used for writing codes, plotting graphs, and solving many complex equations.

Let’s move forward by having a look at how actually to set up the Matlab environment. To download MATLAB, follow this link. You will be prompted to sign in to your Matlab account if don’t have one, create one first. A dialog box like this will open.

Either buy a licensed version or sign up for a trial version. For more details on how to install MATLAB please refer to Installing MATLAB on Windows and Installing MATLAB on Linux.

Let’s have look at the interface now. A MATLAB Environment consists of:

  • Workspace
  • Current Folder
  • Command Window

 

MATLAB installation window

This is the main workspace of MATLAB. If you are working on the functions, then you will yourself work in the Editor field. However, to make GUI and apps, you have to go to the app, and then to Design Apps. For plotting different graphs, use Plots. Here you can find a lot of graphs to work with. You can use Publish for publishing your programs, apps in the form of HTML or PDF. It is mainly used by scientists and engineers for creating reports.

Current folder in MATLAB

It has a track record of what files are present and whatever you are working on. All of the files are listed here. It allows you to navigate through all of your programs and their locations. You can open any of the files and start working on them easily through it. The main purpose of this is when you are working on your projects, then you can inter-relate and work on them.

Command Window in MATLAB

When you run any command it could be seen in the command window, it is present on the bottom of the page. you can see your program name, followed by the variables declared, and the execution of the code. It also helps you to work with your functions, to check the function easily through the command line. 

Workspace in MATLAB

All of the codes that are coded, to evaluate the program can be seen from here. You can write all of the desired code here. Basically, this is the editor, you can write your codes here. Using Matlab editors makes it easy to write code, as it gives you warnings and error information, even before running the program. This may help a lot of your efforts. You can also directly run them by saving them with the ‘.m’ extension.

Workspace

All the variables declared can be seen in the workspace with their values and size and type from here. This workspace gets activated when you run the program. All the variables declared can be seen here. It also shows the size of the variable and its data type.  

Opening a MATLAB Session:

When you are all set and want to save your program, then you need to specify the location path where to store the program. It could be any directory present on your computer. To specify the location follow these steps:

  • Click on the File menu.
  • Left Click the ‘Set Path’ menu. This will open a dialog box.
  • Select the ‘Add Folder’ button and navigate to your desired folder and click on it to highlight it.
  • Click on the ‘OK’ button.
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!