You may want the exponential function (link), the base of the natural logarithms. Answer from Star Strider on mathworks.com
Why Euler's number e = 2.71828... is not a built-in constant in MATLAB?
I understand that we can produce that number in MATLAB by evaluating exp(1), or possibly using exp(sym(1)) for the exact representation. But e is a very common constant in mathematics and it is as ... More on mathworks.com
Why Euler's number e = 2.71828... is not a built-in constant in MATLAB?
I understand that we can produce that number in MATLAB by evaluating exp(1), or possibly using exp(sym(1)) for the exact representation. But e is a very common constant in mathematics and it is as... More on researchgate.net
How do i actually use the e to the power of something in matlab?
If you are referring to the constant "e" (2.718....), then use exp(x*t) More on reddit.com
Matlab says that the 'e' is undefined
Hi, I trying to get an integral of a simple function F(x) = 3*x.^2 + e.^(2*x) and matlab won't let me enter the equation, so I am stuck with figuring out how to enter in the function F(x) into ... More on mathworks.com
Videos
MathWorks
mathworks.com › matlab › mathematics › elementary math › exponents and logarithms
exp - Exponential - MATLAB
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox). ... The exp function can calculate on all variables within a table or timetable without indexing to access those variables.
MathWorks
mathworks.com › matlabcentral › answers › 549723-why-euler-s-number-e-2-71828-is-not-a-built-in-constant-in-matlab
Why Euler's number e = 2.71828... is not a built-in constant in MATLAB? - MATLAB Answers - MATLAB Central
June 17, 2020 - Why Euler's number e = 2.71828... is not a... Learn more about euler's number MATLAB
Reddit
reddit.com › r/matlab › how do i actually use the e to the power of something in matlab?
r/matlab on Reddit: How do i actually use the e to the power of something in matlab?
February 5, 2021 -
I struggle with this basic command. Im new to matlab and ive figured most other basic stuff but that one eludes me. For example how do i do e^x*t in matlab?
MathWorks
mathworks.com › matlabcentral › answers › 350334-matlab-says-that-the-e-is-undefined
Matlab says that the 'e' is undefined - MATLAB Answers - MATLAB Central
July 26, 2017 - In matlab, and many languages, the exponential function is exp, not e.
MathWorks
mathworks.com › matlab › mathematics › elementary math › exponents and logarithms
Powers and Exponentials - MATLAB & Simulink
The m in sqrtm distinguishes this function from sqrt(A), which, like A.^(1/2), does its job element-by-element. ... In addition to raising a matrix to a power, you also can raise a scalar to the power of a matrix. ... When you raise a scalar to the power of a matrix, MATLAB uses the eigenvalues and eigenvectors of the matrix to calculate the matrix power.
Top answer 1 of 2
14
If t is a matrix, you need to use the element-wise multiplication or exponentiation. Note the dot.
x = exp( -t.^2 )
or
x = exp( -t.*t )
2 of 2
5
All the 3 first ways are identical. You have make sure that if t is a matrix you add . before using multiplication or the power.
for matrix:
t= [1 2 3;2 3 4;3 4 5];
tp=t.*t;
x=exp(-(t.^2));
y=exp(-(t.*t));
z=exp(-(tp));
gives the results:
x =
0.3679 0.0183 0.0001
0.0183 0.0001 0.0000
0.0001 0.0000 0.0000
y =
0.3679 0.0183 0.0001
0.0183 0.0001 0.0000
0.0001 0.0000 0.0000
z=
0.3679 0.0183 0.0001
0.0183 0.0001 0.0000
0.0001 0.0000 0.0000
And using a scalar:
p=3;
pp=p^2;
x=exp(-(p^2));
y=exp(-(p*p));
z=exp(-pp);
gives the results:
x =
1.2341e-004
y =
1.2341e-004
z =
1.2341e-004
MathWorks
mathworks.com › symbolic math toolbox › mathematics › mathematical functions
eulergamma - Euler–Mascheroni constant - MATLAB
This MATLAB function represents the Euler–Mascheroni constant.
MathWorks
mathworks.com › matlabcentral › answers › 646873-euler-s-number-syntax-in-matlab
Euler's number syntax in matlab - MATLAB Answers - MATLAB Central
November 13, 2020 - The gain in accuracy is because you first formed an approximation to exp(1) when you did e = exp(1). That value is NOT the exact number. It is a 52 binary bit approximation to the same number. In a binary scientific form, we might have written it as: 10.101101111110000101010001011000101000101011101101010 · But that is just what MATLAB stores.
MathWorks
mathworks.com › matlabcentral › answers › 706903-how-do-i-find-the-value-of-e
how do I find the value of E - MATLAB Answers - MATLAB Central
January 2, 2021 - Hello. I'm beginner at Matlab I want to find the value for E using the "solve" code clear all; clc; syms E M=1; y=0.1; L=1; a=0.01; n=1; u = -(E^2 - M^2); v = 1 + 2*(E^2 - M^2)*a; alpha...
MathWorks
mathworks.com › matlabcentral › answers › 46975-how-to-use-the-mathmatical-constant-e-in-conjunction-with-a-vector
how to use the mathmatical constant "e" in conjunction with a vector. - MATLAB Answers - MATLAB Central
August 29, 2012 - Your problem isn't the e, it's that the two parts you're trying to multiply are both vectors, hence you need .* instead of *: ... https://www.mathworks.com/matlabcentral/answers/46975-how-to-use-the-mathmatical-constant-e-in-conjunction-with-a-vector#comment_96661
MathWorks
mathworks.com › matlabcentral › answers › 1807605-change-exp-from-number-to-e
Change exp from number to e - MATLAB Answers - MATLAB Central
September 19, 2022 - Use sym arguments to exp, otherwise it reverts to the base Matlab numerical function.