Professional Documents
Culture Documents
03 Octave Variabel
03 Octave Variabel
03 Octave Variabel
MATERI #03
DASAR
PEMROGRAMAN
(GNU OCTAVE)
STTMI, 2-4-2015
Contents
Overview
Start, quit, getting help
Variables and data
types
Matrices
Plotting
Programming
Functions and scripts
Files I/O
Octave
Matlab
Overview
Octave is the "open-source Matlab"
Octave is a great gnuplot wrapper
www.octave.org
www.mathworks.com
Octave and Matlab are both, high-level languages
and mathematical programming environments for:
Visualization
Programming, algorithm development
Numerical computation: linear algebra,
optimization, control, statistics, signal and image
processing, etc.
Beware: Octave/Matlab programs can be slow.
Overview
Matlab-Octave comparison:
Matlab is more
flexible/advanced/powerful/costly
Octave is for free (GPL license)
There are minor differences in syntax
Current versions (April 2015):
Octave 3.8.2
Matlab R2015a
Contents
Overview
Start, quit, getting help
Variables and data types
Matrices
Plotting
Programming
Functions and scripts
Files I/O
[...]
Contents
Overview
Start, quit, getting help
Variables and data types
Matrices
Plotting
Programming
Functions and scripts
Files I/O
-1
-5
Size
====
3x3
1x1
21x1
1x5
1x21
Bytes
=====
72
8
168
5
24
Class
=====
double
double
double
char
double
realmin
realmax
eps
format short
format long
digits
format short e
format long e
format short g
format long g
ceil(x)
floor(x)
round(x)
fix(x)
TUGAS
1. Pertemuan selanjutnya 2 pekan lagi
2. Pelajari OCTAVE mandiri
3. Latihan di kampus dengan laptop
masing-masing