%% SL 3
F = [2 2] + [1 -3] + [2 0] + [2 -1.5]
Fn = F / norm(F)

%% SL 12
T = 10 + 4*randn(7, 7);
trace(T)

U = [1 2 3; 0 2 0; ...
0 -2 -1];
det(U)

A = [1 2 3; 4 5 6; 7 8 1];
b = [6 15 16].';
x = inv(A)*b;
% OR
x = A \ b;

%% SL17
v = (25:-5:-5).'

T = [-4:-1:-6; 1:3; pi/2 pi/4 pi/6].'

%% SL18
u = linspace(-1.15, 75.4)
v = linspace(100, -100, 201)
v = 100:-10:-100
v = linspace(100, -100, 200/10+1)

%% SL20
M1 = nan(2)
M2 = ones(1, 4)
M3 = diag([2 3 -5])
M4 = diag([1 1 1], 1)
M4 = [zeros(4, 1) [eye(3); zeros(1, 3)]]
M4 = diag(ones(3, 1), 1)

%% SL22
M = 8*rand(3, 4, 2) - 0.5

%% SL25
A = [1 pi; exp(1) -1i]
A1 = repmat(A, [1 3])
A2 = reshape(A.', [1 4])
A3 = repmat(conj(A), [3 1])
A4 = triu(tril(repmat(A, 3), 1), -1)

%% SL26
A = [1:3; 0:2:4; 0 0 5];
A = repmat(A, [1 2])
B = fliplr(A)
B = flip(A, 2)
C = flipud(B)
C = flip(B, 1)

%% SL29
A = rand(2 + randi(10), 3 + randi(5));
A = cat(3, A, rot90(A,2))
size(A)
numel(A)
length(A)
ndims(A)