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 Functions

    Overview

    In this tutorial, we will learn about Octave Functions.
    We can define functions in separate external files or interactively in the command window. Octave functions can be:

    • Built-In Functions
    • User-defined Functions

    Some Octave built-in functions are listed here:

    https://www.testingdocs.com/octave-built-in-functions/

    Define Function

    The function syntax is shown below:

    function return_value = name(arguments_list)
               function_body
    endfunction

    The function_body consists of Octave statements.

    Create Function

    To create a new function click the following menu option:

    File >> New >> New Function…

     

    Octave New Function

    Enter the new function name. Octave would create the filename with the .m extension. For example, the function Foo would be created in Foo.m function file.

    The file would open in the Editor pane. We can edit and the function body and save the file.

    function retval = Foo (input1, input2)
           fprintf(‘Foo Function \n’);
    endfunction

     

    Octave Functions

    Function Example

    https://www.testingdocs.com/user-defined-function-in-octave/

    —

    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 Arithmetic Operator Precedence› Octave plot command

    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