# Octave Built-in Functions

In this tutorial, we will learn about Octave’s built-in functions. Octave provides the basic mathematical functions inbuilt. We can invoke them with the arguments to use them in the scripts.

## Common Built-in functions

Octave has a large library of built-in mathematical functions. Some of the Octave built-in functions are as follows:

Built-in Function |
Description |

exp(x) |
To compute the exponential function e^x. |

log(x) |
To compute the natural logarithm function ln(x). |

log10(x) |
To compute the logarithm of the base 10. |

abs(x) |
The function returns the absolute value of the argument. |

sqrt(x) |
To compute the square root of x. |

factorial(x) |
To compute the factorial of x. |

To learn more about each function, type the *doc function_name* in the command window prompt. For example, to know the documentation of the function *exp*

*>> doc exp*

## Examples

Let’s invoke these functions with some examples.

We can invoke the function by typing the name of the function in the command window. We can pass the function argument (or arguments) within the brackets( )

*>> exp(1)*

*ans = 2.7183*

*>> abs(-7)*

*ans = 7*

*>> log(3)*

*ans = 1.0986*

*>> sqrt(64)*

*ans = 8*

## Trigonometric Functions

## Octave Tutorials

Octave Tutorial on this website can be found at:

More information on Octave can be found on the official website: