# Logarithm Of Numbers, Vectors and Matrices In MatLab(Illustrated Expression)

In this article of Mechanical Base, we will show you how to calculate the logarithm values of numbers, vectors and matrices in Matlab. You can calculate the logarithm values in 10 basis very easily. Take a look at the examples below then learn how to take logarithms.

### How To Calculate Logarithms Of Numbers, Matrices and Vectors In MatLab?

As you can see above, we calculated the logarithm values of a number, matrix and a vector in Matlab.

- We simply calculated the logarithm value of ‘15’ with ‘a’ variable as shown by red arrow abovei then the result is below in Matlab.
- The vector logarithm calculation is like green arrow above. You need to write your vector in ‘[]’ format inside the ‘log()’ command in Matlab. The whole elements of the vector is calculated separately.
- Also matrix calculation is done as shown by blue arrow, you just enter the your matrix ‘[]’ format as vectors inside the ‘log()’ command in Matlab. The logarithm is calculated for whole elements of matrix separately as you can see above.

**Click and learn how to create matrices and vectors in Matlab.**

So it is very basic to calculate logarithm values of numbers, vectors and matrices in Matlab as you see above.