1510 marks) For the following array:
A = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Write a MATLAB script that will:
1. Hardcode A into the script.
2. Calculate the sum of the even elements of the array, i.e., the second, fourth... elements.
3. Display the results of the sum.
(16) 10 marks) What is the output of the following MATLAB script:
clear; clc
for i = 1:1:3
for j = 1:1:3
if j == 1
fprintf('i = %d\n', i);
else
fprintf('j = %d\n', j);
end
end
end