TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Octave

Octave Built-in functions

Overview

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

Octave 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

 

Octave doc exp Function

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

 

Octave Built-in Functions

Trigonometric Functions

https://www.testingdocs.com/octave-trigonometric-functions/

—

Octave Tutorials

Octave Tutorial on this website can be found at:
https://www.testingdocs.com/octave-tutorial/

More information on Octave can be found on the official website:
https://www.gnu.org/software/octave/index

Related Posts

Octave Package List

Octave /

Install Octave Packages on Linux

Octave /

Octave User defined Function Example

octave command line linux

Octave /

Octave Command line on Ubuntu

Hello World in Octave

Octave /

Hello World in Octave

Octave /

Octave plot example of function y=x^2

‹ Octave plot command› GNU Octave Components

Recent Posts

  • Update draw.io on Windows
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com