Matlab Question Q3 5 Clear Clc M6 Magic 6 Command Generates Matrix M6 M6 35 1 6 26 19 24 3 Q37220940

Matlab Question

% Q3(5%)
clear, clc
M6 = magic(6)
% The above command generates matrix M6:
% M6 =
% 35 1 6 26 19 24
% 3 32 7 21 23 25
% 31 9 2 22 27 20
% 8 28 33 17 10 15
% 30 5 34 12 14 16
% 4 36 29 13 18 11
%
% Slice the above M6 using vector subscripts and assign the resultto a variable M6Small.
% Display M6Small in the Command Window as shown below.
% You must use the “end” index where it applies.
%
% M6Small =
% 7 21 25
% 33 17 15
% 29 13 11
% Write your answer here:


Answer


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.