Professional Documents
Culture Documents
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:
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.