clc, clear all

% Review: punctual operations with arrays
v = [1, 0, -2]

% In v1 you square all the elements of v (punctual square)
v1 = v.^2

% Sum 1 to all elements of v1 (casting)
v2 = v1 + 1

% Take the natural logarithm of all the elements in the array
v3 = log(v2)

A = [1 2; 3 4]

% Square all the elements of A
B = A.^2

% Subtract 1 to all the elements in B
C = B - 1 % or C = B - ones(2, 2)

% Divide each element of C by the corresponding element of A
% (punctual division)
D = C./A

% Compute the sinus of each element in D
E = sin(D)

% Consider the function x^2 + log10(x) + 1
F = [1 2; 3 4]
G = F.^2 + log10(F) + 1