x = 2
x = 2; % x is not printed out
x = (2^3 + 4) / (5 * 3) - 2e10^(-10)
x = sin(0.0)
abs(-2.5) % there's an in-built function for almost everything standard
x = 1 + 1i % complex variables
abs(x) % the magnitude of a complex number
v = [1, 2, 3, 4] % row vector
v = 1:4 % defining ranges
v = 1:0.5:4 % defining non-integer ranges
v = linspace(1, 4, 7) % (start, stop, nb of points)
v' % transpose the row vector
v1 = 1:5; % row vector
v2 = -5:-1; % row vector
v3 = [v1; v2]'
v3 = [v1' v2']
v3 = [v1' v2] % pay attention to dimensions
% indexing a vector
v = [2, 3, 5, 7, 11];
v(2)
v(1:3)
v([1, 3, 5])
v(v <= 7)