Octave
Octave : Basic Operation
a = pi;
disp(a); // 3.1416
A = [1 2; 3 4; 5 6]; // matrix
B = 1:2:10; // matrix [1 3 5 7 9]
C = 1:5; // matrix [1 2 3 4 5]
D = ones(2, 3); // 2*3 matrix with all 1s
E = zeros(2, 2); // 2*2 matrix with all 0s
F = rand(1, 3); // 1*3 matrix with each random numbers
hist(A); // show histogram of A
G = eye(6); // 6*6 identity matrix
help rand; // get documentation of randOctave : Moving Data Around
矩陣操作
Octave : Computing on Data
Octave : Plotting Data
Octave : Control Statements (if, for, while)
Octave : Vectorization
以計算 Cost function 為例
以計算 Gradient Descent 為例
Last updated