Octave Logarithm Functions[ 2024 ]
Octave Logarithm Functions
In this tutorial, we will learn Octave Logarithm Functions. Octave supports many logarithmic functions in-built.
Logarithm Functions
Some of the functions are as follows:
- log
- log10
- log2
- log1p
Logarithm Function | Description |
log(X) | To compute the natural logarithm ln(X) |
log2(X) | To compute the base-2 logarithm |
log10(X) | To compute the base-2 logarithm |
log1p(X) | To compute the value of log (1 + X) accurately in the neighborhood of zero. |
Examples
>> % Example of natural logarithm
>>
>> log(e)
ans = 1
>> log(10)
ans = 2.3026
>> % Note that log is nautral logarithm of base e
>>
>> % Calling two functions
>> log(exp(4))
ans = 4
>>
Screenshot
—
Octave Tutorials
GNU Octave Tutorials on this website can be found at:
For more information on Octave, visit the official website: