y = exp(x)
Answer from Stephen23 on mathworks.com
MathWorks
mathworks.com › matlab › mathematics › elementary math › exponents and logarithms
exp - Exponential - MATLAB
This MATLAB function returns the exponential ex for each element in array X.
MathWorks
mathworks.com › matlab › mathematics › elementary math › exponents and logarithms
Powers and Exponentials - MATLAB & Simulink
x. For example, if you try to add a number smaller than machine precision to 1, then the result gets rounded to 1. ... However, log1p is able to return a more accurate answer. ... Again, expm1 is able to return a more accurate answer. ... Run the command by entering it in the MATLAB Command Window.
How to use the constant e?
So the question is given x =0.2 calculate (x^2) *e^4. I know for pi you just type pi which is just pi in the command. But how do I type e in the command window. Also how to use exponents? Do you ju... More on mathworks.com
Taylor Series of e^x
I have learn that I can learn better using actual example, so even though Subhamoy Saha didn't exactly write the code that I need. I can work from there. Again I am sorry and Thank you both! Sign in to comment. ... Sign in to comment. ... Sign in to comment. Sign in to answer this question. MATLAB ... More on mathworks.com
How can I write this exponential function in matlab?
x == 0 would be 0 for all non-zero ... case of any non-zero value (x+(x==0)) would be the same as the value and for zero exactly it would be 1, thereby preventing division by 0. Sign in to comment. ... https://www.mathworks.com/matlabcentral/answers/391290-how-can-i-write-th... More on mathworks.com
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
Videos
04:20
How to evaluate different function using MATLAB use of exponential ...
08:58
Fitting Exponential Functions to Data in Matlab - YouTube
08:51
Exponential curve plot using MATLAB - YouTube
04:15
Real Exponential Signal in MATLAB | DSP using MATLAB - YouTube
Matlab | Matrix Exponential
07:42
MATLAB Tutorial#3 How to solve Exponential and Logarithmic Functions ...
MathWorks
mathworks.com › matlab › mathematics › elementary math
Exponents and Logarithms - MATLAB & Simulink
This example shows an interesting graphical approach for discovering whether e^pi is greater than pi^e. You clicked a link that corresponds to this MATLAB command:
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?
Northwestern University
ece.northwestern.edu › local-apps › matlabhelp › techdoc › ref › exp.html
exp (MATLAB Functions)
The exp function is an elementary function that operates element-wise on arrays. Its domain includes complex numbers. Y = exp(X) returns the exponential for each element of X.
YouTube
youtube.com › watch
Matlab Online Tutorial - 18 - Exponentials and Logarithms - YouTube
Get more lessons like this at http://www.MathTutorDVD.comLearn how to calculate with logarithms and exponential functions in matlab. Logs and exponentials a...
Published March 23, 2018
MathWorks
mathworks.com › matlabcentral › answers › 2070196-e-x-maclaurin-serie
e^x maclaurin serie - MATLAB Answers - MATLAB Central
January 15, 2024 - It will prompt you to input the value of x and the number of terms N. Then, it will calculate and display the result of e^x using the series expansion up to N terms. Additionally, it shows the result calculated by MATLAB's built-in exp function for comparison.
EDUCBA
educba.com › home › data science › data science tutorials › matlab tutorial › matlab exponential
MATLAB Exponential | 7 Types of Exponential Function in MATLAB
June 4, 2025 - So, in this article, we learned how to use the exponential function in MATLAB. We can use exp(x) syntax in MATLAB to calculate the exponential of any function which is passed as an argument.
Call +917738666252
Address Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
EDUCBA
educba.com › home › data science › data science tutorials › matlab tutorial › exponential in matlab
Exponential in Matlab | How to do Exponential in Matlab?
March 13, 2023 - Then we write the exponential equation using exp function, we take an exp in parenthesis x1 is multiply by 2 and these exponential values are assigned to variable y1, the equation is y1 = e^x, the value of x1 is varied from -5 to 20 and according ...
Call +917738666252
Address Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
Stack Overflow
stackoverflow.com › questions › 64770349 › plotting-an-exponential-function-in-matlab
charts - Plotting an exponential function in matlab - Stack Overflow
... This is because you only input two point into the function plot():(-2,exp(-2)),(2,exp(2)) .In matlab,the x &y of plot(x,y) are vector of the points you have but not their intervals.
Reddit
reddit.com › r/matlab › i need help. how do i write this function in matlab?
r/matlab on Reddit: I need help. How do I write this function in MatLab?
September 14, 2021 -
Does e stand for euler's number? But it still says that my y1 value is incorrect...
Top answer 1 of 2
1
you need to take a look at MATLAB syntax. Here is the equation you are trying to write: y = exp(0.5x)sin(2x) Here is what you actually wrote: y = exp(1)0.5x sin(2)x What you wrote was exponential to power of 1, times x halved, times sin of radians 2, times x. In MATLAB, to use the exponential function correctly you’d want exp(0.5.*x), same with the sin function: sin(2.*x) The command window is a great tool. Why not compare what exp(1) produces with exp(x)? Test everything to understand the syntax. Also use the documentation for any function. For example, for documentation of exp, type “help exp” or “doc exp”.
2 of 2
1
You might be technically right that exp(1) is just Euler's number, but that is absolutely not how that function is supposed to be used. I would preallocate a vector y1 the same length as x with zeros, and then loop over y1 and calculate each entry in that vector. That is, loop the expression y1(i)=exp(0.5*x(i))*sin(2*x(i)) for i=1:length(x). EDIT: I'm also curious about why you're using loglog. The scale of the axes don't require it at all. EDIT 2: I also tried it with y1=exp(1).^(0.5*x).*sin(2.*x) and that got the same answer as the looping solution I initial suggested. EDIT 3: Also, this equation has basically the form of a damped vibration, so the negative values would actually be of interest; thus using loglog() doesn't make any sense.
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 › matlabcentral › answers › 514875-symbolic-toolbox-exponential-equations
Symbolic Toolbox Exponential Equations - MATLAB Answers - MATLAB Central
April 2, 2020 - https://www.mathworks.com/matlabcentral/answers/514875-symbolic-toolbox-exponential-equations#comment_820098 ... Great response. When i enter the value of C which is -6.908 it does not fully simplify the equation in live editor, hence you have to divide through by 250 on num and dem, is this due to the decimal places on that constant?
MathWorks
mathworks.com › matlabcentral › answers › 1643545-how-do-you-properly-type-1-e-x-in-matlab
How do you properly type 1/e^x in matlab? - MATLAB Answers - MATLAB Central
February 5, 2022 - How do you properly type 1/e^x in matlab?. Learn more about matlab, vector, formula, error MATLAB