The log function does exactly what you want. log(14 - y) If you want a base 10 log, you use log10. There is also a log2 function, which gives a base 2 log. Other bases are achieved using the simple relation log(X)/log(b) produces a log to the base b. You could write a function for it as: logb = @(X,b) log(X)/log(b); logb(9,3) ans = 2 which is as expected. Finally, there is the reallog function, which also does the natural log, but it produces an error when the log would have been a complex number. log(-2) ans = 0.693147180559945 + 3.14159265358979i reallog(-2) Error using reallog Reallog produced complex result. But for the more normal case, reallog does the same thing as log. log(2) ans = 0.693147180559945 reallog(2) ans = 0.693147180559945 Answer from John D'Errico on mathworks.com
🌐
MathWorks
mathworks.com › matlabcentral › answers › 431232-how-to-calculate-the-value-of-natural-log-e-in-matlab
How to calculate the value of natural log 'e' in Matlab? - MATLAB Answers - MATLAB Central
November 21, 2018 - One of the nice things about the Matlab doc, it that at the bottom of the page there are links to similar functions, so if Google gets you to exp, the 'See Also' gets to to log and log10. I'm sorry if I sounded a bit snarky btw. Sign in to comment. ... https://www.mathworks.com/matlabcentral/answers/431232-how-to-calculate-the-value-of-natural-log-e-in-matlab#answer_348258
🌐
Quora
quora.com › How-can-I-implement-log-ln-and-e-in-MATLAB
How to implement log, ln, and e in MATLAB - Quora
Answer (1 of 2): It is so easy to write the ‘e’, ‘log’, and ‘ln’ in Matlab. We have to know the built-in function defined for the ‘e’, ‘log’, and ‘ln’ variables. The implementation function is, ‘e’ in Matlab is ‘exp()’ ‘log’ in Matlab is ‘log()’ And for ‘ln’ in Matlab is ‘log()’ (In Matlab , l...
🌐
MathWorks
mathworks.com › matlab › mathematics › elementary math › exponents and logarithms
reallog - Natural logarithm for nonnegative real arrays - MATLAB
Y = reallog(X) returns the natural logarithm of each element in array X. Array X must contain only nonnegative real numbers.
🌐
MathWorks
mathworks.com › matlab › mathematics › elementary math
Exponents and Logarithms - MATLAB & Simulink
In addition to common functions like exp and log, MATLAB® has several other related functions to allow flexible numerical calculations. The expm1 and log1p functions compensate for numerical round-off errors in small arguments, while the reallog, realpow, and realsqrt functions restrict the ...
🌐
Quora
quora.com › How-do-I-use-natural-logarithm-ln-in-matlab
How to use natural logarithm (ln) in matlab - Quora
For simple exponential application, . The use of logarithms is very practical, they simplify the solution of a problem . There are three laws for operations with logarithm : Multiplication.- Log€. X Z. = Log€ X + Log€ Y…………………. Log €X = Ln.X ... A power raised to a power. Ln X^n = n.Ln X ... S.A. Assistant professor in biophysics · Author has 619 answers and 1.8M answer views · 10y · Originally Answered: How do I use ln in matlab?
Find elsewhere
🌐
EDUCBA
educba.com › home › data science › data science tutorials › matlab tutorial › natural log in matlab
Natural Log in Matlab | Learn How to Compute Natural Log in Matlab
May 31, 2023 - The value of e is given by 2.71828 and it is also denoted by a log. So, we should be careful while using a base in any logarithmic equation. In Matlab, natural logarithm is given by log(y) which represents the natural logarithm of y.
Address   Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
YouTube
youtube.com › watch
Matlab Essentials - Sect 18 - Exponentials and Logarithms - YouTube
Math Tutor Series for Matlab Programming.
Published   March 30, 2013
🌐
Cooper
faculty.cooper.edu › smyth › TechCompanion › Calc1 › Ch07 › NaturalLogs.htm
7.2 Natural Logarithms
>> e = exp(1) e = 2.7183 >> log(e) ans = 1 >> syms x t >> int(1/t, 1, x) ans = log(x) >> diff( log(x) ) ans = 1/x · If you need to compute a common (base 10) log use log10(). ... The natural log function in Mathematica is Log[]. Common (base 10) logs may be computed with Log10[].
🌐
MathWorks
mathworks.com › symbolic math toolbox › mathematics › mathematical functions
log - Natural logarithm of entries of symbolic matrix - MATLAB
Y = log(X) returns the natural logarithm of X. ... Input, specified as a number, vector, matrix, or array, or a symbolic number, scalar variable, matrix variable, array, function, matrix function, or expression. ... The log function accepts an input argument of type symfunmatrix.
🌐
Northwestern University
ece.northwestern.edu › local-apps › matlabhelp › techdoc › ref › log.html
log (MATLAB Functions)
The log function operates element-wise on arrays. Its domain includes complex and negative numbers, which may lead to unexpected results if used unintentionally. Y = log(X) returns the natural logarithm of the elements of X.