Answer:
Check the explanation
Step-by-step explanation:
clc,clear
%% (1)
% create a 5x4 array, year1
year1 = [3 6 4 10;
5 8 6 10;
4 9 5 10;
6 4 7 9;
3 5 8 10
];
% create a 5x4 array, year2
year2 = [2 7 3 10;
3 7 5 10;
4 5 5 10;
3 3 8 10;
3 5 2 10
];
%
% concatenate 2d arrays to form 3d array
testdata = cat(3,year1,year2);
%%%
% extract the third column of every year and form a 2d array, question_3
question_3 = [testdata(:,3,1) testdata(:,3,2)];
disp('question_3: '),disp(question_3)
%
%%