GNU Octave (version 7.3.0)
Copyright © 1996-2022 The Octave Project Developers
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions.
This manual documents how to run, install and port GNU Octave, as well as its new features and incompatibilities, and how to report bugs. It corresponds to GNU Octave version 7.3.0.
Table of Contents
- Preface
- 1 A Brief Introduction to Octave
- 2 Getting Started
- 3 Data Types
- 4 Numeric Data Types
- 5 Strings
- 6 Data Containers
- 7 Variables
- 8 Expressions
- 9 Evaluation
- 10 Statements
- 11 Functions and Scripts
- 11.1 Introduction to Function and Script Files
- 11.2 Defining Functions
- 11.3 Returning from a Function
- 11.4 Multiple Return Values
- 11.5 Variable-length Return Lists
- 11.6 Variable-length Argument Lists
- 11.7 Ignoring Arguments
- 11.8 Default Arguments
- 11.9 Validating Arguments
- 11.10 Function Files
- 11.11 Script Files
- 11.11.1 Publish Octave Script Files
- 11.11.2 Publishing Markup
- 11.11.2.1 Using Publishing Markup in Script Files
- 11.11.2.2 Text Formatting
- 11.11.2.3 Sections
- 11.11.2.4 Preformatted Code
- 11.11.2.5 Preformatted Text
- 11.11.2.6 Bulleted Lists
- 11.11.2.7 Numbered Lists
- 11.11.2.8 Including File Content
- 11.11.2.9 Including Graphics
- 11.11.2.10 Including URLs
- 11.11.2.11 Mathematical Equations
- 11.11.2.12 HTML Markup
- 11.11.2.13 LaTeX Markup
- 11.11.3 Jupyter Notebooks
- 11.12 Function Handles and Anonymous Functions
- 11.13 Command Syntax and Function Syntax
- 11.14 Organization of Functions Distributed with Octave
- 12 Errors and Warnings
- 13 Debugging
- 14 Input and Output
- 14.1 Basic Input and Output
- 14.2 C-Style I/O Functions
- 14.2.1 Opening and Closing Files
- 14.2.2 Simple Output
- 14.2.3 Line-Oriented Input
- 14.2.4 Formatted Output
- 14.2.5 Output Conversion for Matrices
- 14.2.6 Output Conversion Syntax
- 14.2.7 Table of Output Conversions
- 14.2.8 Integer Conversions
- 14.2.9 Floating-Point Conversions
- 14.2.10 Other Output Conversions
- 14.2.11 Formatted Input
- 14.2.12 Input Conversion Syntax
- 14.2.13 Table of Input Conversions
- 14.2.14 Numeric Input Conversions
- 14.2.15 String Input Conversions
- 14.2.16 Binary I/O
- 14.2.17 Temporary Files
- 14.2.18 End of File and Errors
- 14.2.19 File Positioning
- 15 Plotting
- 15.1 Introduction to Plotting
- 15.2 High-Level Plotting
- 15.2.1 Two-Dimensional Plots
- 15.2.2 Three-Dimensional Plots
- 15.2.3 Plot Annotations
- 15.2.4 Multiple Plots on One Page
- 15.2.5 Multiple Plot Windows
- 15.2.6 Manipulation of Plot Objects
- 15.2.7 Manipulation of Plot Windows
- 15.2.8 Use of the
interpreter
Property - 15.2.9 Printing and Saving Plots
- 15.2.10 Interacting with Plots
- 15.2.11 Test Plotting Functions
- 15.3 Graphics Data Structures
- 15.3.1 Introduction to Graphics Structures
- 15.3.2 Graphics Objects
- 15.3.3 Graphics Object Properties
- 15.3.3.1 Root Properties
- 15.3.3.2 Figure Properties
- 15.3.3.3 Axes Properties
- 15.3.3.4 Legend Properties
- 15.3.3.5 Line Properties
- 15.3.3.6 Text Properties
- 15.3.3.7 Image Properties
- 15.3.3.8 Patch Properties
- 15.3.3.9 Scatter Properties
- 15.3.3.10 Surface Properties
- 15.3.3.11 Light Properties
- 15.3.3.12 Uimenu Properties
- 15.3.3.13 Uibuttongroup Properties
- 15.3.3.14 Uicontextmenu Properties
- 15.3.3.15 Uipanel Properties
- 15.3.3.16 Uicontrol Properties
- 15.3.3.17 Uitable Properties
- 15.3.3.18 Uitoolbar Properties
- 15.3.3.19 Uipushtool Properties
- 15.3.3.20 Uitoggletool Properties
- 15.3.4 Searching Properties
- 15.3.5 Managing Default Properties
- 15.4 Advanced Plotting
- 16 Matrix Manipulation
- 17 Arithmetic
- 18 Linear Algebra
- 19 Vectorization and Faster Code Execution
- 20 Nonlinear Equations
- 21 Diagonal and Permutation Matrices
- 22 Sparse Matrices
- 23 Numerical Integration
- 24 Differential Equations
- 25 Optimization
- 26 Statistics
- 27 Sets
- 28 Polynomial Manipulations
- 29 Interpolation
- 30 Geometry
- 31 Signal Processing
- 32 Image Processing
- 33 Audio Processing
- 34 Object Oriented Programming
- 35 GUI Development
- 36 System Utilities
- 36.1 Timing Utilities
- 36.2 Filesystem Utilities
- 36.3 File Archiving Utilities
- 36.4 Networking Utilities
- 36.5 Controlling Subprocesses
- 36.6 Process, Group, and User IDs
- 36.7 Environment Variables
- 36.8 Current Working Directory
- 36.9 Password Database Functions
- 36.10 Group Database Functions
- 36.11 System Information
- 36.12 Hashing Functions
- 37 Packages
- Appendix A External Code Interface
- A.1 Oct-Files
- A.1.1 Getting Started with Oct-Files
- A.1.2 Matrices and Arrays in Oct-Files
- A.1.3 Character Strings in Oct-Files
- A.1.4 Cell Arrays in Oct-Files
- A.1.5 Structures in Oct-Files
- A.1.6 Sparse Matrices in Oct-Files
- A.1.7 Accessing Global Variables in Oct-Files
- A.1.8 Calling Octave Functions from Oct-Files
- A.1.9 Calling External Code from Oct-Files
- A.1.10 Allocating Local Memory in Oct-Files
- A.1.11 Input Parameter Checking in Oct-Files
- A.1.12 Exception and Error Handling in Oct-Files
- A.1.13 Documentation and Testing of Oct-Files
- A.2 Mex-Files
- A.3 Standalone Programs
- A.4 Java Interface
- A.1 Oct-Files
- Appendix B Test and Demo Functions
- Appendix C Obsolete Functions
- Appendix D Known Causes of Trouble
- Appendix E Installing Octave
- Appendix F Grammar and Parser
- Appendix G GNU GENERAL PUBLIC LICENSE
- Concept Index
- Function Index
- Operator Index
- Graphics Properties Index