%% SL5
clc, clear
N1 = (-5:5:5)';
N2 = [1:5;2:2:10;primes(11)];
N3 = (1:4)'*(11:14);

N1(end:-1:1)
N2(:, 2:2:end)
N3(1:2:end, :)
N2(2, [2 4 5])

A = reshape(1:12, 3, 4).'
% or
A = zeros(3, 4), A(:) = 1:12, A = A.'

%% SL6
clc, clear
x = 1:20;
S = cumsum(x);
x2 = x(2:2:end);
L = cumsum(x2); % OR L = cumsum(x(2:2:end))
L(end)

plot(x, S, x2, L)

%% SL7
% C is correct

%% SL10
% D is correct
clc, clear

A = magic(6)
B = ones(size(A))
A([2:3 5], :) = B([1 1 1], :)
% or
A([2:3 5], :) = B(ones(1, 3), 1:6)

%% SL11
clc, clear
M(:, :, 1) = eye(3),
M(:, :, 2) = ones(3),
M(:, :, 3) = diag([2 3 5])

M(1:2, 1:2, 1) = NaN

