Hello World in Octave

Published on 11 April 2018 (Updated: 11 December 2023)

Welcome to the Hello World in Octave page! Here, you'll find the source code for this program as well as a description of how the program works.

Current Solution

disp('Hello, World!');

Hello World in Octave was written by:

This article was written by:

If you see anything you'd like to change or update, please consider contributing.

How to Implement the Solution

Syntax in Octave is based on its Octave scripting language.

One line is all it takes! The "details-hidden" nature of the languages removes the need to declare variables or classes before the fun begins. disp is the command in Octave that formats data and displays it in the command window. In this case, the data is the string "Hello, World!" (denoted by the quotations).

How to Run the Solution

If you want to try this out yourself:

Run the script like this:

octave -qf hello-world.m

Alternatively, you can use Octave Online. Just copy/paste the script into the input command prompt and press Enter.