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 Arithmetic Operators

    Overview

    In this tutorial, we will learn about Octave Arithmetic Operators. Arithmetic operators can be used for performing various mathematical operations on the variables. We can use these operators on both scalars and on vectors.

    Octave Arithmetic Operators

    An arithmetic operator is a symbol that Octave uses for arithmetic operations like addition, subtraction, multiplication, division, and exponentiation.

    The arithmetic operators symbols are as follows:

    Arithmetic Operation
    Operator Symbol  Example
    Addition

     

    + a + b
    Subtraction – a – b
    Multiplication * a * b
    Left Division

    Right Division

    \

    /  

    a / b
    Power/Exponentiation **  or ^ a ** b or a ^b

    Example

    Let’s compute the sum of 10 and 25.

    In this example, we will declare two scalar variables. Add the variables with the addition operator and print the result.

    a = 10;

    b = 25;

    result = a + b ;

    Screenshot

    Octave Arithmetic Operator

     

    Element wise operations on Vectors

    Arithmetic Operation
    Operator Symbol  Example
    Addition

     

    .+ a .+ b
    Subtraction .- a .- b
    Multiplication .* a .* b
    Division ./ a ./ b
    Power .**  or .^ a .** b

    —

    Octave Tutorials

    GNU Octave Tutorials on this website can be found at:

    https://www.testingdocs.com/octave-tutorial/

    For more information on Octave, visit 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

    ‹ Comments in Octave Scripts› Octave Power Operator

    Recent Posts

    • Running Tests in Parallel with Selenium Grid
    • Advanced Selenium Features
    • Locating Web Elements
    • Running the Test Script
    • Writing Your First Selenium Test Script
    • Getting Started with Selenium Automation Testing
    • Setting Up the Environment
    • How can you monitor the Quality Assurance Audit?
    • Leveraging LambdaTest with Appium 2.0
    • Appium 2.0 Plugins ListAppium 2.0 Plugins
    • Touch Actions and Multi-Touch Actions
    • Changes in Drivers and Classes
    • Appium Inspector
    • Capabilities in Appium 2.0
    • Appium 2.0 Driver ListAppium 2.0 Driver Installation & Management
    CyberLink Multimedia Software

    Back to Top

    Links

    • Contact
    • Privacy Policy
    • Cookie Policy

    www.TestingDocs.com