logB(X) = logA(X) / logA(B) You can pick A to be one of the built in functions, like log or log2 or log10. E.g., log3(9) = log(9) / log(3) , or log3(9) = log10(9) / log10(3) , etc. Answer from James Tursa on mathworks.com
🌐
MathWorks
mathworks.com › matlabcentral › answers › 1465394-how-do-i-calculate-a-logarithm-of-a-variable-base
How do I calculate a logarithm of a variable base? - MATLAB Answers - MATLAB Central
October 2, 2021 - I saw that calculating log of the base of 10 or e is possible. for an example: after typing log (a,b) - I recieve an ERROR message. I'd like to use "a" as a varying number and change it using a loop until I'll get a good result. "a" can be for an example - 1.05, 1.003.... ... Too many input arguments. ... Sign in to comment. Sign in to answer this question. ... https://www.mathworks.com/matlabcentral/answers/1465394-how-do-i-calculate-a-logarithm-of-a-variable-base#answer_800204
🌐
MathWorks
mathworks.com › matlabcentral › fileexchange › 14866-logb
logb - File Exchange - MATLAB Central
September 1, 2016 - Examples: 1) To calculate the base 5 logarithm of 3: y = logb(3,5) 2) To calculate element-wise the log of a non-scalar input using different bases: y = logb(magic(3),[1 2 3; 4 5 6; 7 8 9]); See also: log, log10, log2 · Brett Shoelson (2025). ...
Find elsewhere
🌐
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 range of these functions to real numbers.
🌐
EDUCBA
educba.com › home › data science › data science tutorials › matlab tutorial › matlab log
Matlab log | Learn the different examples of Matlab log
March 8, 2023 - Matlab log method can be used to compute the natural logarithm or common logarithm of any number. It can also be used to compute the natural logarithm or common logarithm of an array of numbers or a matrix of numbers. Please keep in mind that a natural logarithm has “e” as its base, where “e” represents Euler’s number and has a value of 2.71828, and a common logarithm has 10 as its base.
Address   Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
Quora
quora.com › How-can-I-implement-log-ln-and-e-in-MATLAB
How to implement log, ln, and e in MATLAB - Quora
MATLAB already provides the standard logarithm functions and the constant e, but if you need to implement them yourself (for learning, custom numeric types, or constrained environments), here are concise, reliable approaches. ... Natural log: log(x) returns ln(x) (base e).
🌐
MathWorks
mathworks.com › matlabcentral › answers › 52224-log-of-10-base-b-where-b-is-defined-as-1-to-10-in-increments-of-1
Log of 10 base "b" where 'b' is defined as 1 to 10 in increments of 1 - MATLAB Answers - MATLAB Central
October 29, 2012 - It is for school BTW, and all i know is Log(base'b')(X)=log(base'e')(x) over log(base'b'(b) where be is all values between 1-10. Sign in to comment. Sign in to answer this question. ... https://www.mathworks.com/matlabcentral/answers/52224-log-of-10-base-b-where-b-is-defined-as-1-to-10-in-increments-of-1#answer_63659
🌐
MathWorks
mathworks.com › matlabcentral › answers › 527923-how-to-find-log-with-base-value
How to find log with base value - MATLAB Answers - MATLAB Central
May 20, 2020 - According to the change of base rule for logarithms, you can use the logarithm function of a specific base to find the logarithm of any base where it is defined. For example ... https://www.mathworks.com/matlabcentral/answers/527923-how-to-find-log-with-base-value#comment_852543
🌐
Autarkaw
programming.autarkaw.com › ProgrammingConceptsBook › module-4-math-and-data-analysis.html
Module 4: MATH AND DATA ANALYSIS | Introduction to Programming Concepts with MATLAB
Note the different code used for finding the natural log (Example 1) and the log with a different specified base (Example 2). The functions for natural log, exponential function, and log10 can all be found in Table 1 at the end of this lesson. MATLAB has several trigonometric functions.
🌐
Quora
quora.com › How-do-I-use-natural-logarithm-ln-in-matlab
How to use natural logarithm (ln) in matlab - Quora
You can use directly log(x) in MATLAB to do this . If you want to use logarithm of x to the base 10, you need to use log10(x).
🌐
MathWorks
mathworks.com › matlabcentral › answers › 282038-how-to-draw-a-log-function
How to draw a log function? - MATLAB Answers - MATLAB Central
May 1, 2016 - y = 10^(log10(y)) = 10^(1+log10(x)) = (10^1)*(10^log10(x)) = 10*x ... Not correct, I'm afraid, I tried this, however obviously z and y are identical and nonlinear! ... Again, I'm trying to do this in matlab, help! ... Hey, no fair, Ahmad! You slipped in a factor of 1.75 on your trial. You have 10.^(-.3+1.75*log10(x)) instead of your original 1+log10(x).