Use of the exp () function in MATLAB

Source: Internet
Author: User
Tags natural logarithm
In MATLAB we often need to use the number of natural logarithm of the base e, the need to enter the different power of E, then we in MATLAB specifically how to operate it. Let's take a look at the different examples below. e Below we have an example of how to enter the natural number, in the MATLAB main window Input exp (1), Enter we can see the natural number logarithm base value e=2.7183 wrong way one : in M Talab The main window, enter E, and enter to see that this is not the natural number logarithm base value. error mode two : Enter exp in MATLAB, enter can see direct input exp, also can not output e value, prompt error when input variable too little. Exp (0) as a special point, we verify the value of exp (0), enter exp (0) in the main MATLAB window, carriage return this is equivalent to E^0=1 exp (a) A is constant we will not say, if a is a vector or matrix, we have to make an example. vector case: with A=[0 1 2] For example, enter A=[0 1 2] in the main MATLAB window , exp (A) Enter can see the power of each vector element respectively. Matrix case : Take a=[0 1; 2 1] For example, enter A=[0 1 in the main window of MATLAB, 2 1] exp (A) Enter can see also the power value of each element of the matrix.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.