You are on page 1of 4

INSTALLATION GUIDEBOOK

prepared by
Dimas A. F. Muzhoffar (2023-November)
1)
Download GNU Octave Installer:
https://octave.org/download

2)
Install GNU Octave.

2
3)
Start and arrange the GNU Octave: Editor, Workspace, and Command Window

3
4)
Tutorial Scope:

Hello World For-Loop


New Code; For-Loop 1-D Matrices;
Hello World: disp(‘text’). For-Loop 2-D Matrices;
For-Loop Ranges.
Variable and Arithmetic 1
Variables: variable = ‘content’; Matrices Manipulation
Addition, Substraction: 1 + 1, 1 - 1; Combining Matrices: [1, 2, MATRIX];
Multiplication, Division: 2 * 2, 2 / 2; Identify Matrices: size(MATRIX).
Exponent: 2 ^ 2.
I/O: CSV, Excel
Vectors and Matrices Export to: CSV, Excel;
Vectors: [1, 2, 3, 4,], [1; 2; 3; 4;]; Import from (Numerical): CSV, Excel;
Matrices: [1, 2; 3, 4,]; Import from (General): CSV, Excel.
Arithmetic-by-element: .* ./ + -.
Data to Graph: 2D, 3D
Data Access (Indexing)
Accessing an Element: variable(1,2); Packages: Download, Application
Accessing Several Elements: variable(1,[2,3]).

Range (Colon)
Range, 1-D Vector: 1:5, [1:5];
Incremental Range, 1-D Vector: 1:2:15;
Select-Range Element: variable(1,2:3);
Select-All Element: variable(1,:).

Arithmetic 2
Round to Nearest: round(1.499);
Round Up: ceil(1.499);
Round Down: floor(1.499);
Maximum-Minimum: max([1, 2; 3, 4]).

Logical
TRUE–FALSE: 1, 0;
Equal–Not Equal: 1 == 0, 1 != 0;
More Than–Less Than: 1 > 0, 1 < 0;
And–Or: 1 && 1, 1 || 1.

If-Else
If: if TRUE, endif;
If-Else: if TRUE, else, endif;
If-Elseif-Else: if TRUE, elseif, else, endif.

You might also like