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 exponent
 

Matlab exponent

Updated March 14, 2023

Matlab exponent

 

 

Introduction to MATLAB exponent

MATLAB offers us different types of exponent functions that can compute the exponential of an array or matrix. These functions can be used to compute basic exponential, matrix exponential, or exponential integral as per our requirement. In this article, we will learn about 3 exponent functions offered by MATLAB: exp, expint, and expm. With the help of these functions, we can compute the solution when our input is an array, matrix, or a complex number and ‘e’ is raised to this power.

Watch our Demo Courses and Videos

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

Syntax of exponent function:

  1. E = exp (I)
  2. E = expint (I)
  3. E = expm (I)

Description of the syntax:

  1. E = exp (I) is used to return the exponential ‘e’ raised to the power (I). For an array, it will compute the exponential of every element
  2. E = expint (I) is used to return the exponential integral of every element in the input ‘I’
  3. E = expm (I) is used to compute the matrix exponential for our input matrix ‘I’. Please note that matrix exponential is given by the formula:

expm(I) = EVec * diag (exp (diag (EVal))) / EVec, where EVec represents Eigen Vectors and Eval represents Eigen Values

Examples of Matlab exponent

Let us now understand the code for these exponent functions in MATLAB

Example #1 (exp (I))

In this example, we will find the exponent of an array in MATLAB by using the exp (I) function. Below are the steps to be followed:

  1. Initialize the array whose exponent we need to compute
  2. Pass the input array as an argument to the exp function

Code:

I = [2 4 6 2 6] [Initializing the array whose exponent we need to compute] E = exp (I)
[Passing the input array as an argument to the exp function]

This is how our input and output will look like in MATLAB:

Input:

Matlab exponent input 1

Output:

Matlab exponent output 1

As we can see in the output, the exp function has computed the exponential of every element in our input array ‘I’.

 Next, we will learn the use of the expint function

Example #2 (expint (I))

In this example, we will find the integral exponent of an array in MATLAB by using the expint (I) function. Below are the steps to be followed:

  1. Initialize the array whose integral exponent we need to compute
  2. Pass the input array as an argument to the expint function

Code:

I = [2 3 5 1 6] [Initializing the array whose integral exponent we need to compute] E = expint (I)
[Passing the input array as an argument to the expm function]

This is how our input and output will look like in MATLAB:

Input:

Matlab exponent input 2

Output:

Matlab exponent output 2

As we can see in the output, the expint function has computed the integral exponential of every element in our input array ‘I’.

Next, we will learn the use of the expm function

Example #3 (expm (I))

In this example, we will find the matrix exponent of a matrix in MATLAB by using the expm (I) function. Below are the steps to be followed:

  1. Initialize the matrix whose matrix exponent we need to compute
  2. Pass the input matrix as an argument to the expm function

Code:

I = [2 3 5; 1 0 3; 2 5 7] [Initializing the 3 x 3 matrix whose matrix exponent we need to compute] 
E = expint (I)
[Passing the input matrix as an argument to the expm function]

This is how our input and output will look like in MATLAB:

Input:

input 3

Output:

output 3

As we can see in the output, the expm function has computed the matrix exponential of our input matrix ‘I’.

The exponent functions discussed above can also be used to compute the exponential of complex numbers. Let us understand this with an example.

Example #4 (exp (I))

In this example, we will find the exponent of an array of complex numbers in MATLAB by using the exp (I) function. Below are the steps to be followed:

  1. Initialize the array of complex numbers whose exponent we need to compute
  2. Pass the input array as an argument to the exp function

Code:

I = [2 + 3i   5 - 1i   4 + 5i] [Initializing the array of complex numbers whose exponent we need to compute] E = exp (I)
[Passing the input array as an argument to the exp function]

This is how our input and output will look like in MATLAB:

Input:

input 4

Output:

output 4

As we can see in the output, the exp function has computed the exponential of every complex element in our input array ‘I’.

Conclusion

  1. Different forms of Exponent function can be used to compute the exponentials as per our requirement.
  2. Basic exponential, integral exponential, matrix exponential are the types of exponentials we can compute using the exponent functions.
  3. The exponential of complex numbers can also be calculated using the exponent functions.

Recommended Articles

This is a guide to Matlab exponent. Here we discuss the 3 exponent functions offered by MATLAB: exp, expint and expm, along with the examples. You may also have a look at the following articles to learn more –

  1. Matlab Backslash
  2. Matlab limit
  3. Step Function Matlab
  4. Plot graph Matlab

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