EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Data Science Data Science Tutorials Matlab Tutorial MATLAB Toolbox
 

MATLAB Toolbox

Priya Pedamkar
Article byPriya Pedamkar

Updated July 3, 2023

MATLAB Toolbox

 

 

Introduction to MATLAB Toolbox

In this article, we will study toolboxes in MATLAB. The toolboxes in MATLAB comprise a wide range of functions that are integrated into MATLAB’s computing environment.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

Here are a few toolboxes in MATLAB:

  1. ‘Curve Fitting’
  2. ‘Regression learner’
  3. ‘Image processing’

These toolboxes can be accessed using the ‘APPS’ icon in the MATLAB ribbon. Let us now understand the use of a couple of toolboxes in MATLAB:

Curve Fitting Toolbox

  • The curve fitting toolbox enables users to fit surfaces and curves to input data by employing techniques such as interpolation, regression, and smoothing.
  • This Toolbox provides us with functions and an application to fit curves to our data.
  • This toolbox is very helpful in data analytics as it helps in performing EDA (exploratory data analysis), data processing, and removing outliers

Let us now understand using the Curve fitting toolbox using an example.

Example

In this example, we will use 3 metrics ‘x’, ‘y’, ‘z’ and will fit a curve in them using the Curve fitting toolbox. We will follow the following steps:

  1. Create the 3 matrices using rand function
  2. Set the ‘X Data’, ‘Y Data’, ‘Z Data’ in Curve fitting tool to our inputs, ‘x,’ ‘y’, ‘z’, respectively

Code: (to be executed in Command Window)

x = rand (5)
y = rand (5)
z = rand (5)

[Creating the 3 input matrices]

Once we execute the above code in ‘Command Window’, we will get the 3 variables created in our ‘WORKSPACE’.

Steps to Use Curve Fitting toolbox

Step 1: Click on APPS icon

Step 2: Select ‘Curve Fitting Tool’

Step 3: A pop-up window will open like below:

MATLAB Toolbox - 1

Step 4: Now set the ‘X Data’, ‘Y Data’, and ‘Z Data’ in this pop-up window to our inputs, ‘x,’ ‘y’, and ‘z,’ respectively. We can immediately see that Curve Fitting Toolbox will create a curve. The equation for this curve can be seen in the Result section. We can use a custom equation using the dropdown on the top of the curve.

Output:

MATLAB Toolbox - 2

Next, let us learn how Regression Learner Toolbox works in MATLAB

Regression Learner Toolbox

  • The Regression Learner toolbox is used to perform regression
  • It is used to train a model automatically
  • It can also be used to compare different options amongst linear regression, support vector machines, regression trees & visualize the results

Let us now understand the use of the Regression Learner toolbox using an example.

Example

In this example, we will use an inbuilt dataset provided by MATLAB, ‘carbig’. We will upload this dataset to the ‘Regression Learner Toolbox’ and explore possible options. We will follow the following steps:

  • Load the inbuilt dataset ‘carbig’
  • Create a table using this dataset to load it into ‘Regression Learner Toolbox’

Code: (to be executed in Command Window)

load carbig

[Loading the ‘carbig’ dataset into the Workspace]

newTable = table (Cylinders, Acceleration, Displacement,...
Model_Year, Horsepower, Weight, Origin);

[Creating the table using the dataset to make it compatible with Regression Learner Toolbox]

Once we execute the above code in ‘Command Window’, we will get the ‘newTable’ created in our ‘WORKSPACE.’

Steps to Use Regression Learner Toolbox

Step 1: Click on APPS icon

Step 2: Select ‘Regression Learner Toolbox’

Step 3: A pop-up window will open like below:

MATLAB Toolbox - 3

Step 4: Click on New Session in the left, which will open a new window prompt

Step 5: From the ‘Data Set Variable’ dropdown, select the ‘newTable’ table created by us

Step 6: This will load all the predictor variables under the section ‘Predictors’

Predictors

Step 7: Now we can select the predictor variables as per our requirement

Step 8: Click on ‘Start Session’ to start analyzing the data

We can immediately see a response plot created by Regression Learner Toolbox. As per our requirement, we can train this data and get a response plot, residual plot, and min MSE plot using the available options.

Output:

Regression Learner

Let us now understand the use of the Image processing toolbox using an example.

Image Processing Toolbox

Below we will learn about the image processing toolbox:

Example

In this example, we will use one of the inbuilt images provided by MATLAB, ‘moon.tiff. We will upload this dataset to ‘Image Processing Toolbox’ and explore possible options.

moonImage = imread ('moon.tif')

[Loading the ‘moon.tif’ image into the Workspace]

imtool (moonImage)

[Using ‘imtool’ function to start the Image processing toolbox. Alternatively, we can also select it from the APP section]

Once we execute the above code in ‘Command Window,’ we will get the ‘moonImage’ in our ‘WORKSPACE’.

Options Provided by Image Processing Toolbox

  • Pixel Information
  • Distance between the 2 pixels
  • Details about the image
  • Adjust contrast
  • Crop Image
  • Zoom tool
  • Scroll bars

Output:

Image Processing

As we can see in the output, we have obtained an image of the moon that can be processed using the icons in the ribbon.

Conclusion – MATLAB Toolbox

The toolboxes in MATLAB are a collection of numerous functions MATLAB provides various toolboxes to perform functionalities like data analytics, image processing, curve fitting, etc.

Recommended Articles

This is a guide to MATLAB Toolbox. Here we discuss the three different toolboxes in MatLab with examples and outputs. You can also go through our other related articles to learn more –

  1. Matlab AND Operator
  2. Vectors in Matlab
  3. What is Simulink in Matlab?
  4. MATLAB Interpolation

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA Login

Forgot Password?

🚀 Limited Time Offer! - 🎁 ENROLL NOW