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

Octave

Comments in Octave Scripts

Overview

In this tutorial, we will learn how to use comments in Octave scripts. A comment is some useful text included in a script for human readers to understand the code. Comments are not executed and ignored by Octave.

Single Line comment

Comments make the Octave script or program easy to understand.

In the Octave, a single line comment starts with either the percent (%) or the # symbol and continues to the end of the line.

For example, a single-line comment is entered at the command prompt in the Command Window.

Single line Octave Comment

Block Comments

In the Octave language, entire blocks of text can be commented by enclosing the code between the following markers:

  • %{ and %}
  • #{ and #}

Example

 

% Octave Single Line Comment
# This is also single line comment

disp('Octave Tutorials');

%{
This is an Octave block comment
This text will not execute
%}


disp('www.TestingDocs.com');


#{
This is another Octave block comment
This text will not execute
#}

Comments in Octave Scripts
—

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

‹ Create a New Matrix using Octave› Octave Arithmetic Operators

Recent Posts

  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • RAPTOR Editions
  • Flowgorithm Conditional Breakpoint Statement
  • Flowgorithm Read Numbers from File Example
  • Search Text File Flowchart Example
  • Flowgorithm Turtle Graphics Symbols
  • Draw Circle using Flowgorithm Turtle
  • Draw Parallel Lines using Flowgorithm Graphics

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version